]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bug #232815
authorFredrik Lundh <fredrik@pythonware.com>
Tue, 3 Jul 2001 19:27:05 +0000 (19:27 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Tue, 3 Jul 2001 19:27:05 +0000 (19:27 +0000)
ch is unsigned, so testing for negative values doesn't make
sense (as noticed by the OpenVMS compiler)

Modules/regexpr.c

index 8b3658005f023b10b180b62ead0eda24dab2acd1..8694c743b3a46e72ce48e7be449997886dfb9bd2 100644 (file)
@@ -1383,7 +1383,7 @@ char *re_compile_pattern(unsigned char *regex, int size, regexp_t bufp)
                        if (a < '0' || a > '9')
                                goto bad_match_register;
                        ch = 10 * (a - '0') + ch - '0';
-                       if (ch <= 0 || ch >= RE_NREGS)
+                       if (ch == 0 || ch >= RE_NREGS)
                                goto bad_match_register;
                        bufp->uses_registers = 1;
                        opcode = Cmatch_memory;