Fix a bug in RtlMultiByteToUnicodeSize. Credits belong to whoever debugged it.

svn path=/trunk/; revision=23183
This commit is contained in:
Filip Navara 2006-07-20 06:25:51 +00:00
parent 2c1a305f03
commit 602677e8f5

View file

@ -285,19 +285,13 @@ RtlMultiByteToUnicodeSize(PULONG UnicodeSize,
{ {
if (NlsLeadByteInfo[*(PUCHAR)MbString++]) if (NlsLeadByteInfo[*(PUCHAR)MbString++])
{ {
if (!MbSize) if (MbSize)
{ {
/* partial char, ignore it */ /* Move on */
Length++; MbSize--;
break; MbString++;
} }
} }
else
{
/* Move on */
MbSize--;
MbString++;
}
/* Increase returned size */ /* Increase returned size */
Length++; Length++;