From b4d1bd17a9a85feb5f13cc6fac201f4f75942f70 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Tue, 6 May 2025 00:39:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DStringInstance=E6=9C=AB?= =?UTF-8?q?=E4=BD=8D=E6=B7=BB0=E6=97=B6=E5=8F=AF=E8=83=BD=E5=86=85?= =?UTF-8?q?=E5=AD=98=E4=B8=8D=E5=A4=9F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/hgl/type/StringInstance.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/hgl/type/StringInstance.h b/inc/hgl/type/StringInstance.h index 4db7d29..d1db086 100644 --- a/inc/hgl/type/StringInstance.h +++ b/inc/hgl/type/StringInstance.h @@ -400,7 +400,7 @@ namespace hgl if(need_length>malloc_length) { - malloc_length=power_to_2(need_length); + malloc_length=power_to_2(need_length+1); T *new_str=new T[malloc_length];