CString should allow arbitrary data.

This commit is contained in:
Philip Rideout
2020-09-24 00:03:18 -07:00
parent 4a604c2513
commit ac07719414
2 changed files with 6 additions and 6 deletions

View File

@@ -36,7 +36,6 @@ int StaticString::compare(const StaticString& rhs) const noexcept {
UTILS_NOINLINE
CString::CString(const char* cstr, size_t length) {
if (length && cstr) {
assert(length == strlen(cstr));
Data* p = (Data*)malloc(sizeof(Data) + length + 1);
p->length = (size_type)length;
mCStr = (value_type*)(p + 1);