msvcp90: Fix buffer size in basic_string_char_grow.

This commit is contained in:
Piotr Caban 2011-10-18 11:13:52 +02:00 committed by Alexandre Julliard
parent b0211b5b18
commit 59514c463a
1 changed files with 2 additions and 2 deletions

View File

@ -607,7 +607,7 @@ MSVCP_bool __thiscall basic_string_char_grow(
if(new_res/3 < this->res/2)
new_res = this->res + this->res/2;
ptr = MSVCP_allocator_char_allocate(this->allocator, new_res);
ptr = MSVCP_allocator_char_allocate(this->allocator, new_res+1);
if(!ptr)
ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+1);
else
@ -2271,7 +2271,7 @@ MSVCP_bool __thiscall basic_string_wchar_grow(
if(new_res/3 < this->res/2)
new_res = this->res + this->res/2;
ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res);
ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+1);
if(!ptr)
ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+1);
else