]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(re_match_2_internal): Correct check for charset after exactn in loop.
authorUlrich Drepper <drepper@redhat.com>
Mon, 23 Aug 1999 17:38:16 +0000 (17:38 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 23 Aug 1999 17:38:16 +0000 (17:38 +0000)
posix/regex.c

index 99cf4c31a7fa8ea740ec73a71a2b6dda780ac565..5f52deb0846265bcf5c7c2dcc5c019525f4ac933 100644 (file)
@@ -4833,26 +4833,15 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
              }
             else if ((re_opcode_t) *p2 == charset)
              {
-#ifdef DEBUG
-               register unsigned char c
-                  = *p2 == (unsigned char) endline ? '\n' : p2[2];
-#endif
-
-#if 0
+               /* We win if the first character of the loop is not part
+                   of the charset.  */
                 if ((re_opcode_t) p1[3] == exactn
                    && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
                          && (p2[2 + p1[5] / BYTEWIDTH]
                              & (1 << (p1[5] % BYTEWIDTH)))))
-#else
-                if ((re_opcode_t) p1[3] == exactn
-                   && ! ((int) p2[1] * BYTEWIDTH > (int) p1[4]
-                         && (p2[2 + p1[4] / BYTEWIDTH]
-                             & (1 << (p1[4] % BYTEWIDTH)))))
-#endif
                   {
                    p[-3] = (unsigned char) pop_failure_jump;
-                    DEBUG_PRINT3 ("  %c != %c => pop_failure_jump.\n",
-                                  c, p1[5]);
+                   DEBUG_PRINT1 ("  No match => pop_failure_jump.\n");
                   }
 
                else if ((re_opcode_t) p1[3] == charset_not)