mirror of
https://github.com/reactos/wine.git
synced 2025-02-25 23:35:31 +00:00
msvcp71: Fixed basic_string::ptr implementation.
This commit is contained in:
parent
84c5e3a198
commit
8de45a3df1
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user