mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
add NULL termate on ansi string when WideCharToMultiByteCP doing wchar to ansi converting.
svn path=/trunk/; revision=24232
This commit is contained in:
parent
63535f6e15
commit
cc70b77eca
1 changed files with 7 additions and 1 deletions
|
@ -569,7 +569,7 @@ IntWideCharToMultiByteCP(UINT CodePage, DWORD Flags,
|
|||
WideCharCount = MultiByteCount;
|
||||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
}
|
||||
|
||||
|
||||
for (TempLength = WideCharCount;
|
||||
TempLength > 0;
|
||||
WideCharString++, TempLength--)
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue