Index: compiled/String.h |
=================================================================== |
--- a/compiled/String.h |
+++ b/compiled/String.h |
@@ -276,17 +276,17 @@ |
OwnedString newValue(length() + additionalSize); |
if (length() > 0) |
std::memcpy(newValue.mBuf, mBuf, sizeof(value_type) * length()); |
*this = std::move(newValue); |
} |
public: |
explicit OwnedString(size_type len = 0) |
- : String(nullptr, len, READ_WRITE) |
+ : String(nullptr, len, len ? READ_WRITE : INVALID) |
{ |
if (len) |
{ |
mBuf = new value_type[length()]; |
annotate_address(mBuf, "String"); |
} |
else |
mBuf = nullptr; |