msvcp71: Fixed basic_string::ptr implementation.

This commit is contained in:
Piotr Caban 2012-10-17 09:59:53 +02:00 committed by Alexandre Julliard
parent 84c5e3a198
commit 8de45a3df1
1 changed files with 4 additions and 4 deletions

View File

@ -531,7 +531,7 @@ const MSVCP_size_t MSVCP_basic_string_char_npos = -1;
DEFINE_THISCALL_WRAPPER(basic_string_char_ptr, 4)
char* __thiscall basic_string_char_ptr(basic_string_char *this)
{
if(this->res == BUF_SIZE_CHAR-1)
if(this->res < BUF_SIZE_CHAR)
return this->data.buf;
return this->data.ptr;
}
@ -541,7 +541,7 @@ char* __thiscall basic_string_char_ptr(basic_string_char *this)
DEFINE_THISCALL_WRAPPER(basic_string_char_const_ptr, 4)
const char* __thiscall basic_string_char_const_ptr(const basic_string_char *this)
{
if(this->res == BUF_SIZE_CHAR-1)
if(this->res < BUF_SIZE_CHAR)
return this->data.buf;
return this->data.ptr;
}
@ -2214,7 +2214,7 @@ const MSVCP_size_t MSVCP_basic_string_wchar_npos = -1;
DEFINE_THISCALL_WRAPPER(basic_string_wchar_ptr, 4)
wchar_t* __thiscall basic_string_wchar_ptr(basic_string_wchar *this)
{
if(this->res == BUF_SIZE_WCHAR-1)
if(this->res < BUF_SIZE_WCHAR)
return this->data.buf;
return this->data.ptr;
}
@ -2226,7 +2226,7 @@ wchar_t* __thiscall basic_string_wchar_ptr(basic_string_wchar *this)
DEFINE_THISCALL_WRAPPER(basic_string_wchar_const_ptr, 4)
const wchar_t* __thiscall basic_string_wchar_const_ptr(const basic_string_wchar *this)
{
if(this->res == BUF_SIZE_WCHAR-1)
if(this->res < BUF_SIZE_WCHAR)
return this->data.buf;
return this->data.ptr;
}