From cd6307987937cd077111c8c292b9f2f84c48364a Mon Sep 17 00:00:00 2001 From: Louis Simard Date: Sun, 14 Nov 2010 23:19:51 -0500 Subject: [PATCH] Fix bug 638764: Error in rule_ellptical_arc crashes Scour, by applying the fix provided by Walther. --- svg_regex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svg_regex.py b/svg_regex.py index 282e45d..00b6158 100644 --- a/svg_regex.py +++ b/svg_regex.py @@ -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()