diff options
| author | Richard M. Stallman | 1996-05-11 18:05:52 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-05-11 18:05:52 +0000 |
| commit | 12c11fcd42eb8b8ef14f8b6c090d06d069a9043b (patch) | |
| tree | fb6bf68408c2b6a4088df23b29e30b4be67c166f /src | |
| parent | fc85cb2995c7ce6196464dce599ad540f7dfe413 (diff) | |
| download | emacs-12c11fcd42eb8b8ef14f8b6c090d06d069a9043b.tar.gz emacs-12c11fcd42eb8b8ef14f8b6c090d06d069a9043b.zip | |
(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 'src')
| -rw-r--r-- | src/regex.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) | |||
| 4505 | #endif | 4505 | #endif |
| 4506 | 4506 | ||
| 4507 | if ((re_opcode_t) p1[3] == exactn | 4507 | if ((re_opcode_t) p1[3] == exactn |
| 4508 | && ! ((int) p2[1] * BYTEWIDTH > (int) p1[4] | 4508 | && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5] |
| 4509 | && (p2[1 + p1[4] / BYTEWIDTH] | 4509 | && (p2[2 + p1[5] / BYTEWIDTH] |
| 4510 | & (1 << (p1[4] % BYTEWIDTH))))) | 4510 | & (1 << (p1[5] % BYTEWIDTH))))) |
| 4511 | { | 4511 | { |
| 4512 | p[-3] = (unsigned char) pop_failure_jump; | 4512 | p[-3] = (unsigned char) pop_failure_jump; |
| 4513 | DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n", | 4513 | DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n", |