diff options
author | Guido van Rossum <guido@python.org> | 1992-01-26 18:23:48 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-01-26 18:23:48 (GMT) |
commit | 521f81ca26ee5b00d8cc6bda920a8bf3248a2bdd (patch) | |
tree | 278ad0974de4f1ea59254d3512c0fe3b4c213956 /Modules/regexpr.c | |
parent | 610cdc52ca19f79cbe0629e4308d9ec4c8eb8708 (diff) | |
download | cpython-521f81ca26ee5b00d8cc6bda920a8bf3248a2bdd.zip cpython-521f81ca26ee5b00d8cc6bda920a8bf3248a2bdd.tar.gz cpython-521f81ca26ee5b00d8cc6bda920a8bf3248a2bdd.tar.bz2 |
Retract the rage bugfix, but change the range assertion.
Diffstat (limited to 'Modules/regexpr.c')
-rw-r--r-- | Modules/regexpr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/regexpr.c b/Modules/regexpr.c index c769348..137e41d 100644 --- a/Modules/regexpr.c +++ b/Modules/regexpr.c @@ -1379,7 +1379,7 @@ regexp_registers_t regs; char anchor; assert(size1 >= 0 && size2 >= 0 && pos >= 0 && mstop >= 0); - assert(pos + range + 1 >= 0 && pos + range - 1 <= size1 + size2); + assert(pos + range >= 0 && pos + range <= size1 + size2); /* Bugfix by ylo */ assert(pos <= mstop); fastmap = bufp->fastmap; @@ -1396,6 +1396,7 @@ regexp_registers_t regs; } else dir = 1; + /* range--; /* Bugfix by Guido */ if (anchor == 2) if (pos != 0) return -1; |