ch is unsigned, so testing for negative values doesn't make
sense (as noticed by the OpenVMS compiler)
This commit is contained in:
Fredrik Lundh 2001-07-03 19:27:05 +00:00
parent 20006b2d51
commit ee2f18d0ee
1 changed files with 1 additions and 1 deletions

View File

@ -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;