summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-05-12 02:57:30 +0000
committerJim Meyering <jim@meyering.net>1996-05-12 02:57:30 +0000
commitd4a3e63ec8bc2c3ac4459561271fcc424a96ab1e (patch)
treeb1119aeedf16825567f7e5703425ce115e169403 /lib
parentf64964aa1da7124f969dd88bd72ed158330cfa4f (diff)
downloadcoreutils-d4a3e63ec8bc2c3ac4459561271fcc424a96ab1e.tar.xz
Sat May 11 13:30:53 1996 enami tsugutomo <enami@ba2.so-net.or.jp>
* regex.c (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.
Diffstat (limited to 'lib')
-rw-r--r--lib/regex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/regex.c b/lib/regex.c
index d262e50d9..b3432622c 100644
--- a/lib/regex.c
+++ b/lib/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",