[KERNEL32] Fix multibyte conversion in default char (#2111)

Fix kernel32!MultiByteToWideChar function. The default character was wrong. CORE-16468
This commit is contained in:
Katayama Hirofumi MZ 2019-11-30 15:10:10 +09:00 committed by GitHub
parent 1ad16a37f2
commit ccc52d2e5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -654,14 +654,9 @@ IntMultiByteToWideCharCP(UINT CodePage,
continue;
}
if (MultiByteString == MbsEnd)
if (MultiByteString == MbsEnd || *MultiByteString == 0)
{
*WideCharString++ = MultiByteTable[Char];
}
else if (*MultiByteString == 0)
{
*WideCharString++ = UNICODE_NULL;
MultiByteString++;
*WideCharString++ = CodePageTable->UniDefaultChar;
}
else
{