kernel32/locale: Don't fail with non-NULL args when the Unix codepage falls back to UTF-8.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2019-09-04 17:27:24 +03:00 committed by Alexandre Julliard
parent cf92311425
commit 6f8bea3049
1 changed files with 6 additions and 2 deletions

View File

@ -2727,9 +2727,13 @@ INT WINAPI WideCharToMultiByte( UINT page, DWORD flags, LPCWSTR src, INT srclen,
ret = wine_cp_wcstombs( unix_cptable, flags, src, srclen, dst, dstlen,
defchar, used ? &used_tmp : NULL );
if (used) *used = used_tmp;
break;
}
/* fall through */
else
{
ret = wine_utf8_wcstombs( flags, src, srclen, dst, dstlen );
if (used) *used = FALSE;
}
break;
case CP_UTF8:
if (defchar || used)
{