aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/ustr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/ustr.cpp b/common/ustr.cpp
index c0a2412b59..520016d515 100644
--- a/common/ustr.cpp
+++ b/common/ustr.cpp
@@ -90,7 +90,7 @@ U32String::U32String(const char *beginP, const char *endP) : _size(0), _str(_sto
initWithCStr(beginP, endP - beginP);
}
-U32String::U32String(const String &str) : _size(0) {
+U32String::U32String(const String &str) : _size(0), _str(_storage) {
initWithCStr(str.c_str(), str.size());
}
@@ -423,7 +423,7 @@ void U32String::initWithCStr(const char *str, uint32 len) {
// Copy the string into the storage area
for (size_t idx = 0; idx < len; ++idx, ++str)
- _str[idx] = *str;
+ _str[idx] = (byte)(*str);
_str[len] = 0;
}