fix a bug of str assignment

This commit is contained in:
blueloveTH 2023-07-26 01:25:20 +08:00
parent a0bc51ab94
commit 67c0c68463

View File

@ -83,6 +83,7 @@ int utf8len(unsigned char c, bool suppress){
if(!is_inlined()) pool64.dealloc(data); if(!is_inlined()) pool64.dealloc(data);
size = other.size; size = other.size;
is_ascii = other.is_ascii; is_ascii = other.is_ascii;
_cached_c_str = nullptr;
_alloc(); _alloc();
memcpy(data, other.data, size); memcpy(data, other.data, size);
return *this; return *this;