Fixed too ambitious "nothing to repeat" check. Closes bug #114033.

This commit is contained in:
Fredrik Lundh 2000-10-07 17:38:23 +00:00
parent 5c0b43d1e2
commit 13ac9926ac
4 changed files with 6 additions and 3 deletions

View file

@ -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