Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ee2f18d

Browse files
author
Fredrik Lundh
committed
bug #232815
ch is unsigned, so testing for negative values doesn't make sense (as noticed by the OpenVMS compiler)
1 parent 20006b2 commit ee2f18d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/regexpr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ char *re_compile_pattern(unsigned char *regex, int size, regexp_t bufp)
13831383
if (a < '0' || a > '9')
13841384
goto bad_match_register;
13851385
ch = 10 * (a - '0') + ch - '0';
1386-
if (ch <= 0 || ch >= RE_NREGS)
1386+
if (ch == 0 || ch >= RE_NREGS)
13871387
goto bad_match_register;
13881388
bufp->uses_registers = 1;
13891389
opcode = Cmatch_memory;

0 commit comments

Comments
 (0)