修复StringInstance末位添0时可能内存不够的问题
This commit is contained in:
parent
3f44011ea2
commit
b4d1bd17a9
@ -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];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user