summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2001-07-03 19:27:05 +0000
committerFredrik Lundh <fredrik@pythonware.com>2001-07-03 19:27:05 +0000
commit2c449bd64ae3cba8fa5149bb670052d05e385915 (patch)
tree9e7a226beddb43872391817d9f556c6659238944 /Modules
parent4cff6617ce836433031aec3b8f25e1f76e6b38ea (diff)
downloadcpython-2c449bd64ae3cba8fa5149bb670052d05e385915.tar.gz
bug #232815
ch is unsigned, so testing for negative values doesn't make sense (as noticed by the OpenVMS compiler)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/regexpr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/regexpr.c b/Modules/regexpr.c
index 8b3658005f..8694c743b3 100644
--- a/Modules/regexpr.c
+++ b/Modules/regexpr.c
@@ -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;