ntdll: Fix wcsncpy() implementation now that length is unsigned.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49206 Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cff04b34ac
commit
647c54e539
|
@ -244,8 +244,8 @@ int __cdecl wcsncmp( LPCWSTR str1, LPCWSTR str2, size_t n )
|
||||||
LPWSTR __cdecl wcsncpy( LPWSTR s1, LPCWSTR s2, size_t n )
|
LPWSTR __cdecl wcsncpy( LPWSTR s1, LPCWSTR s2, size_t n )
|
||||||
{
|
{
|
||||||
WCHAR *ret = s1;
|
WCHAR *ret = s1;
|
||||||
while (n-- > 0) if (!(*s1++ = *s2++)) break;
|
for ( ; n; n--) if (!(*s1++ = *s2++)) break;
|
||||||
while (n-- > 0) *s1++ = 0;
|
for ( ; n; n--) *s1++ = 0;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue