Fix bug 638764: Error in rule_ellptical_arc crashes Scour, by applying the fix provided by Walther.

This commit is contained in:
Louis Simard 2010-11-14 23:19:51 -05:00
parent fee74ead24
commit cd63079879

View file

@ -221,14 +221,14 @@ class SVGPathParser(object):
arguments = []
while token[0] in self.number_tokens:
rx = Decimal(token[1]) * 1
if rx < 0.0:
if rx < Decimal("0.0"):
raise SyntaxError("expecting a nonnegative number; got %r" % (token,))
token = next()
if token[0] not in self.number_tokens:
raise SyntaxError("expecting a number; got %r" % (token,))
ry = Decimal(token[1]) * 1
if ry < 0.0:
if ry < Decimal("0.0"):
raise SyntaxError("expecting a nonnegative number; got %r" % (token,))
token = next()