ソースを参照

fix a bug of str assignment

blueloveTH 2 年 前
コミット
67c0c68463
1 ファイル変更1 行追加0 行削除
  1. 1 0
      src/str.cpp

+ 1 - 0
src/str.cpp

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