msvcp110: Fix Yarn::operator=(const char*) implementation.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2016-05-10 15:23:58 +02:00 committed by Alexandre Julliard
parent ed79f45817
commit f8a0f90eff
1 changed files with 20 additions and 16 deletions

View File

@ -1644,6 +1644,7 @@ _Yarn_char* __thiscall _Yarn_char_op_assign_cstr(_Yarn_char *this, const char *s
{
TRACE("(%p %p)\n", this, str);
if(str != this->str) {
_Yarn_char__Tidy(this);
if(str) {
@ -1656,6 +1657,7 @@ _Yarn_char* __thiscall _Yarn_char_op_assign_cstr(_Yarn_char *this, const char *s
}
memcpy(this->str, str, (len+1)*sizeof(char));
}
}
return this;
}
@ -1762,6 +1764,7 @@ _Yarn_wchar* __thiscall _Yarn_wchar_op_assign_cstr(_Yarn_wchar *this, const wcha
{
TRACE("(%p %p)\n", this, str);
if(str != this->str) {
_Yarn_wchar__Tidy(this);
if(str) {
@ -1774,6 +1777,7 @@ _Yarn_wchar* __thiscall _Yarn_wchar_op_assign_cstr(_Yarn_wchar *this, const wcha
}
memcpy(this->str, str, (len+1)*sizeof(wchar_t));
}
}
return this;
}