Commit 647c54e5 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Fix wcsncpy() implementation now that length is unsigned.

parent cff04b34
......@@ -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;
}
......
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