Commit 2c449bd6 authored by Fredrik Lundh's avatar Fredrik Lundh

bug #232815

ch is unsigned, so testing for negative values doesn't make
sense (as noticed by the OpenVMS compiler)
parent 4cff6617
...@@ -1383,7 +1383,7 @@ char *re_compile_pattern(unsigned char *regex, int size, regexp_t bufp) ...@@ -1383,7 +1383,7 @@ char *re_compile_pattern(unsigned char *regex, int size, regexp_t bufp)
if (a < '0' || a > '9') if (a < '0' || a > '9')
goto bad_match_register; goto bad_match_register;
ch = 10 * (a - '0') + ch - '0'; ch = 10 * (a - '0') + ch - '0';
if (ch <= 0 || ch >= RE_NREGS) if (ch == 0 || ch >= RE_NREGS)
goto bad_match_register; goto bad_match_register;
bufp->uses_registers = 1; bufp->uses_registers = 1;
opcode = Cmatch_memory; opcode = Cmatch_memory;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment