From: Richard M. Stallman Date: Sat, 11 May 1996 18:05:52 +0000 (+0000) Subject: (re_match_2_internal): Fix off-by-one error; don't use X-Git-Tag: emacs-19.34~648 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=12c11fcd42eb8b8ef14f8b6c090d06d069a9043b;p=emacs.git (re_match_2_internal): Fix off-by-one error; don't use length of exactn as character, and don't use length of bitmap of charset as bitmap. --- diff --git a/src/regex.c b/src/regex.c index e6d04a57df5..43cff323052 100644 --- a/src/regex.c +++ b/src/regex.c @@ -4505,9 +4505,9 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) #endif if ((re_opcode_t) p1[3] == exactn - && ! ((int) p2[1] * BYTEWIDTH > (int) p1[4] - && (p2[1 + p1[4] / BYTEWIDTH] - & (1 << (p1[4] % BYTEWIDTH))))) + && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5] + && (p2[2 + p1[5] / BYTEWIDTH] + & (1 << (p1[5] % BYTEWIDTH))))) { p[-3] = (unsigned char) pop_failure_jump; DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",