Commit 8de45a3d authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp71: Fixed basic_string::ptr implementation.

parent 84c5e3a1
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment