Author: dgorbachev
Date: Wed Dec 3 11:40:49 2008
New Revision: 37836
URL:
http://svn.reactos.org/svn/reactos?rev=37836&view=rev
Log:
Fix Unicode -> Multibyte conversion (bug #3903).
Modified:
trunk/reactos/dll/win32/kernel32/misc/nls.c
Modified: trunk/reactos/dll/win32/kernel32/misc/nls.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/nl…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/nls.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/nls.c [iso-8859-1] Wed Dec 3 11:40:49 2008
@@ -433,7 +433,7 @@
UCHAR Char;
USHORT DBCSOffset;
LPCSTR MbsEnd = MultiByteString + MultiByteCount;
- ULONG Count;
+ INT Count;
/* Does caller query for output buffer size? */
if (WideCharCount == 0)
@@ -770,8 +770,9 @@
{
if(ch & 0xff00)
{
- UCHAR uOffset = CodePageTable->DBCSOffsets[ch >> 8];
- return (CodePageTable->MultiByteTable[(uOffset << 8) + (ch &
0xff)] == wch);
+ USHORT uOffset = CodePageTable->DBCSOffsets[ch >> 8];
+ /* if (!uOffset) return (CodePageTable->MultiByteTable[ch] == wch); */
+ return (CodePageTable->DBCSOffsets[uOffset + (ch & 0xff)] == wch);
}
return (CodePageTable->MultiByteTable[ch] == wch);