Fix typos in conditions. Bug 670556, r=emk
authorSimon Montagu <smontagu@smontagu.org>
Sun, 22 Jan 2012 12:04:05 +0200
changeset 86297 f9596d9d2d2b2752eff35caccaa8bf5c9761c944
parent 86296 91eebc6bdb597e482f7d522c06dec7ceeb051fc1
child 86298 71370660e59d3342c2328bac06d21ae5c6561707
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemk
bugs670556
milestone12.0a1
Fix typos in conditions. Bug 670556, r=emk
intl/uconv/util/uscan.c
--- a/intl/uconv/util/uscan.c
+++ b/intl/uconv/util/uscan.c
@@ -588,17 +588,17 @@ PRIVATE PRBool uCnSAlways8BytesDecompose
   
   PRUint16 LIndex, VIndex, TIndex;
   /* no 8 bytes, not in a4 range, or the first 2 byte are not a4d4 */
   if((inbuflen < 8) || (0xa4 != in[0]) || (0xd4 != in[1]) ||
     (0xa4 != in[2] ) || (0xa4 != in[4]) || (0xa4 != in[6]))
     return PR_FALSE;
   
   /* Compute LIndex  */
-  if((in[3] < 0xa1) && (in[3] > 0xbe)) { /* illegal leading consonant */
+  if((in[3] < 0xa1) || (in[3] > 0xbe)) { /* illegal leading consonant */
     return PR_FALSE;
   } 
   else {
     static const PRUint8 lMap[] = {
       /*        A1   A2   A3   A4   A5   A6   A7  */
       0,   1,0xff,   2,0xff,0xff,   3,
         /*   A8   A9   AA   AB   AC   AD   AE   AF  */
         4,   5,0xff,0xff,0xff,0xff,0xff,0xff,
@@ -609,29 +609,29 @@ PRIVATE PRBool uCnSAlways8BytesDecompose
     };
     
     LIndex = lMap[in[3] - 0xa1];
     if(0xff == (0xff & LIndex))
       return PR_FALSE;
   }
   
   /* Compute VIndex  */
-  if((in[5] < 0xbf) && (in[5] > 0xd3)) { /* illegal medial vowel */
+  if((in[5] < 0xbf) || (in[5] > 0xd3)) { /* illegal medial vowel */
     return PR_FALSE;
   } 
   else {
     VIndex = in[5] - 0xbf;
   }
   
   /* Compute TIndex  */
   if(0xd4 == in[7])  
   {
     TIndex = 0;
   } 
-  else if((in[7] < 0xa1) && (in[7] > 0xbe)) {/* illegal trailling consonant */
+  else if((in[7] < 0xa1) || (in[7] > 0xbe)) {/* illegal trailing consonant */
     return PR_FALSE;
   } 
   else {
     static const PRUint8 tMap[] = {
       /*        A1   A2   A3   A4   A5   A6   A7  */
       1,   2,   3,   4,   5,   6,   7,
         /*   A8   A9   AA   AB   AC   AD   AE   AF  */
         0xff,   8,   9,  10,  11,  12,  13,  14,