- Fix converting of UTF8 sequences in IntMultiByteToWideCharUTF8.
authorFilip Navara <filip.navara@gmail.com>
Tue, 31 Aug 2004 19:54:14 +0000 (19:54 +0000)
committerFilip Navara <filip.navara@gmail.com>
Tue, 31 Aug 2004 19:54:14 +0000 (19:54 +0000)
svn path=/trunk/; revision=10755

reactos/lib/kernel32/misc/nls.c

index 2153bcb..81b06eb 100755 (executable)
@@ -344,9 +344,12 @@ IntMultiByteToWideCharUTF8(DWORD Flags,
          continue;
       }
       Length = UTF8Length[Char - 0x80];
-      WideChar = UTF8Mask[Length];
+      WideChar = Char & UTF8Mask[Length];
       while (Length && MultiByteString < MbsEnd)
+      {
          WideChar = (WideChar << 6) | *MultiByteString++;
+         Length--;
+      }
       *WideCharString++ = WideChar;
    }