summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/BString.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/BString.h b/includes/BString.h
index 794126f..89f1d9f 100644
--- a/includes/BString.h
+++ b/includes/BString.h
@@ -14,8 +14,8 @@ namespace Balau {
class String : private std::string {
public:
String() : std::string() { }
- String(const char * str) : std::string(str) { }
- String(const char * str, size_t n) : std::string(str, n) { }
+ String(const char * str) : std::string(str ? str : "") { }
+ String(const char * str, size_t n) : std::string(str ? str : "", str ? n : 0) { }
String(char c) { set("%c", c); }
String(int32_t i) { set("%i", i); }
String(uint32_t i) { set("%u", i); }