10 Mar
2023
10 Mar
'23
1:02 a.m.
From: li wenzhe <584592187(a)qq.com> --- dlls/ntdll/wcstring.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/wcstring.c b/dlls/ntdll/wcstring.c index aa43c3de16b..96c51bd960f 100644 --- a/dlls/ntdll/wcstring.c +++ b/dlls/ntdll/wcstring.c @@ -353,7 +353,12 @@ int __cdecl wcsncmp( LPCWSTR str1, LPCWSTR str2, size_t n ) LPWSTR __cdecl wcsncpy( LPWSTR s1, LPCWSTR s2, size_t n ) { WCHAR *ret = s1; - for ( ; n; n--) if (!(*s1++ = *s2++)) break; + for ( ; n; n--) { + if (!(*s1++ = *s2++)) { + n--; + break; + } + } for ( ; n; n--) *s1++ = 0; return ret; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2363