From: Fredrik Lundh Date: Tue, 3 Jul 2001 19:27:05 +0000 (+0000) Subject: bug #232815 X-Git-Tag: v2.2a3~1359 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee2f18d0ee87f9287d16b3b93986bac1e0b100e4;p=thirdparty%2FPython%2Fcpython.git bug #232815 ch is unsigned, so testing for negative values doesn't make sense (as noticed by the OpenVMS compiler) --- diff --git a/Modules/regexpr.c b/Modules/regexpr.c index 8b3658005f02..8694c743b3a4 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;