add NULL termate on ansi string when WideCharToMultiByteCP doing wchar to ansi converting.

svn path=/trunk/; revision=24232
This commit is contained in:
Magnus Olsen 2006-09-23 07:28:44 +00:00
parent 63535f6e15
commit cc70b77eca

View file

@ -577,6 +577,12 @@ IntWideCharToMultiByteCP(UINT CodePage, DWORD Flags,
*MultiByteString++ = ((PCHAR)CodePageTable->WideCharTable)[*WideCharString];
}
if (WideCharCount>2)
{
MultiByteString--;
*MultiByteString = 0;
}
/* FIXME */
if (UsedDefaultChar != NULL)
*UsedDefaultChar = FALSE;