diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2000-10-07 17:38:23 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2000-10-07 17:38:23 (GMT) |
commit | 13ac9926ac43d3bff39a08301696105208774b6e (patch) | |
tree | 483ca7a4344c3a573e6f3f91262f111c376560e4 /Lib/sre_compile.py | |
parent | 5c0b43d1e26e28608170baf2887a82124b62fa36 (diff) | |
download | cpython-13ac9926ac43d3bff39a08301696105208774b6e.zip cpython-13ac9926ac43d3bff39a08301696105208774b6e.tar.gz cpython-13ac9926ac43d3bff39a08301696105208774b6e.tar.bz2 |
Fixed too ambitious "nothing to repeat" check. Closes bug #114033.
Diffstat (limited to 'Lib/sre_compile.py')
-rw-r--r-- | Lib/sre_compile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py index 97a57e2..dc508e5 100644 --- a/Lib/sre_compile.py +++ b/Lib/sre_compile.py @@ -222,7 +222,7 @@ def _optimize_charset(charset, fixup): def _simple(av): # check if av is a "simple" operator lo, hi = av[2].getwidth() - if lo == 0: + if lo == 0 and hi == MAXREPEAT: raise error, "nothing to repeat" return lo == hi == 1 and av[2][0][0] != SUBPATTERN |