shlwapi: Fix wnsprintfW/wvnsprintfW %C conversion.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Akihiro Sagawa 2020-02-19 23:21:43 +09:00 committed by Alexandre Julliard
parent e98dbf2e94
commit 850b63b65e
1 changed files with 9 additions and 2 deletions

View File

@ -525,8 +525,15 @@ INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, __ms_va_list ar
*p++ = argData.wchar_view; *p++ = argData.wchar_view;
break; break;
case WPR_CHAR: case WPR_CHAR:
*p++ = argData.char_view; {
break; WCHAR wc;
if (!IsDBCSLeadByte( (BYTE)argData.char_view )
&& MultiByteToWideChar( CP_ACP, 0, &argData.char_view, 1, &wc, 1 ) > 0)
*p++ = wc;
else
*p++ = 0;
break;
}
case WPR_STRING: case WPR_STRING:
{ {
LPCSTR ptr = argData.lpcstr_view; LPCSTR ptr = argData.lpcstr_view;