blueloveTH 2 years ago
parent
commit
b1ee038583
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/str.cpp

+ 1 - 1
src/str.cpp

@@ -17,7 +17,7 @@ int utf8len(unsigned char c, bool suppress){
         if(this->size < sizeof(this->_inlined)){            \
         if(this->size < sizeof(this->_inlined)){            \
             this->data = this->_inlined;                    \
             this->data = this->_inlined;                    \
         }else{                                              \
         }else{                                              \
-            this->data = (char*)pool64_alloc(this->size);   \
+            this->data = (char*)pool64_alloc(this->size+1); \
         }
         }
 
 
 #define PK_STR_COPY_INIT(__s)  \
 #define PK_STR_COPY_INIT(__s)  \