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:
Alexandre Julliard 2020-08-03 13:00:03 +02:00
parent cff04b34ac
commit 647c54e539
1 changed files with 2 additions and 2 deletions

View File

@ -244,8 +244,8 @@ int __cdecl wcsncmp( LPCWSTR str1, LPCWSTR str2, size_t n )
LPWSTR __cdecl wcsncpy( LPWSTR s1, LPCWSTR s2, size_t n )
{
WCHAR *ret = s1;
while (n-- > 0) if (!(*s1++ = *s2++)) break;
while (n-- > 0) *s1++ = 0;
for ( ; n; n--) if (!(*s1++ = *s2++)) break;
for ( ; n; n--) *s1++ = 0;
return ret;
}