Browse Source

Fix a bug in BIG-5 support

louyihua 9 years ago
parent
commit
a768994a59
1 changed files with 1 additions and 1 deletions
  1. 1 1
      text.c

+ 1 - 1
text.c

@@ -1357,7 +1357,7 @@ PAL_MultiByteToWideChar(
 				{
 					if ((BYTE)mbs[i] < 0x40 || ((BYTE)mbs[i] >= 0x7f && (BYTE)mbs[i] <= 0xa0))
 						wcs[wlen++] = invalid_char;
-					else if (mbs[i] <= 0x7e)
+					else if ((BYTE)mbs[i] <= 0x7e)
 						wcs[wlen++] = cptbl_big5[(BYTE)mbs[i - 1] - 0x81][(BYTE)mbs[i] - 0x40];
 					else
 						wcs[wlen++] = cptbl_big5[(BYTE)mbs[i - 1] - 0x81][(BYTE)mbs[i] - 0x60];