; Fix bug in regexp debug code

* src/regex-emacs.c (print_partial_compiled_pattern):
Only the 7 bottom bits of the first byte form the bitmap size.
This commit is contained in:
Mattias Engdegård 2023-07-21 11:56:42 +02:00
parent 0f9fd1d5a5
commit 3b5f13dc49

View file

@ -554,7 +554,7 @@ print_partial_compiled_pattern (re_char *start, re_char *end)
fprintf (stderr, "/charset [%s",
(re_opcode_t) *(p - 1) == charset_not ? "^" : "");
if (p + *p >= pend)
if (p + (*p & 0x7f) >= pend)
fputs (" !extends past end of pattern! ", stderr);
for (c = 0; c < 256; c++)