changeset 15214:308abb9a57f4

(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.
author Richard M. Stallman <rms@gnu.org>
date Sat, 11 May 1996 18:05:52 +0000
parents 867e4ead88d9
children 681866822119
files src/regex.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/regex.c	Sat May 11 17:26:00 1996 +0000
+++ b/src/regex.c	Sat May 11 18:05:52 1996 +0000
@@ -4505,9 +4505,9 @@
 #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",