修复StringInstance末位添0时可能内存不够的问题

This commit is contained in:
hyzboy 2025-05-06 00:39:41 +08:00
parent 3f44011ea2
commit b4d1bd17a9

View File

@ -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];