From: Ulrich Drepper Date: Mon, 23 Aug 1999 17:38:16 +0000 (+0000) Subject: (re_match_2_internal): Correct check for charset after exactn in loop. X-Git-Tag: cvs/glibc_2-1-2~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd6da23cad8b374bdf24d68963d5c13dfcc9a587;p=thirdparty%2Fglibc.git (re_match_2_internal): Correct check for charset after exactn in loop. --- diff --git a/posix/regex.c b/posix/regex.c index 99cf4c31a7f..5f52deb0846 100644 --- a/posix/regex.c +++ b/posix/regex.c @@ -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)