[Pcre-svn] [1132] code/trunk/pcre_compile.c: pcre32: Fix sig…

Kezdőlap
Üzenet törlése
Szerző: Subversion repository
Dátum:  
Címzett: pcre-svn
Tárgy: [Pcre-svn] [1132] code/trunk/pcre_compile.c: pcre32: Fix signed-unsigned compare
Revision: 1132
          http://vcs.pcre.org/viewvc?view=rev&revision=1132
Author:   chpe
Date:     2012-10-18 19:35:22 +0100 (Thu, 18 Oct 2012)


Log Message:
-----------
pcre32: Fix signed-unsigned compare

Modified Paths:
--------------
    code/trunk/pcre_compile.c


Modified: code/trunk/pcre_compile.c
===================================================================
--- code/trunk/pcre_compile.c    2012-10-18 18:35:18 UTC (rev 1131)
+++ code/trunk/pcre_compile.c    2012-10-18 18:35:22 UTC (rev 1132)
@@ -5822,7 +5822,7 @@
           }
         namelen = (int)(ptr - name);


-        if ((terminator > 0 && *ptr++ != terminator) ||
+        if ((terminator > 0 && *ptr++ != (pcre_uchar)terminator) ||
             *ptr++ != CHAR_RIGHT_PARENTHESIS)
           {
           ptr--;      /* Error offset */
@@ -6062,7 +6062,7 @@


           if (lengthptr != NULL)
             {
-            if (*ptr != terminator)
+            if (*ptr != (pcre_uchar)terminator)
               {
               *errorcodeptr = ERR42;
               goto FAILED;
@@ -6204,7 +6204,7 @@
             *errorcodeptr = ERR62;
             goto FAILED;
             }
-          if (*ptr != terminator)
+          if (*ptr != (pcre_uchar)terminator)
             {
             *errorcodeptr = ERR42;
             goto FAILED;
@@ -6310,7 +6310,7 @@
           while(IS_DIGIT(*ptr))
             recno = recno * 10 + *ptr++ - CHAR_0;


-          if (*ptr != terminator)
+          if (*ptr != (pcre_uchar)terminator)
             {
             *errorcodeptr = ERR29;
             goto FAILED;
@@ -6790,13 +6790,13 @@
         if (ptr[1] != CHAR_PLUS && ptr[1] != CHAR_MINUS)
           {
           BOOL is_a_number = TRUE;
-          for (p = ptr + 1; *p != 0 && *p != terminator; p++)
+          for (p = ptr + 1; *p != 0 && *p != (pcre_uchar)terminator; p++)
             {
             if (!MAX_255(*p)) { is_a_number = FALSE; break; }
             if ((cd->ctypes[*p] & ctype_digit) == 0) is_a_number = FALSE;
             if ((cd->ctypes[*p] & ctype_word) == 0) break;
             }
-          if (*p != terminator)
+          if (*p != (pcre_uchar)terminator)
             {
             *errorcodeptr = ERR57;
             break;
@@ -6814,7 +6814,7 @@


         p = ptr + 2;
         while (IS_DIGIT(*p)) p++;
-        if (*p != terminator)
+        if (*p != (pcre_uchar)terminator)
           {
           *errorcodeptr = ERR57;
           break;