summaryrefslogtreecommitdiff
path: root/gerber
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2015-03-17 18:36:59 -0300
committerPaulo Henrique Silva <ph.silva@gmail.com>2015-04-07 13:25:53 -0300
commit820d8aa9034fda56071f3ac2367b80eb0d1cb93a (patch)
treeb0915e8abaaac76d19ecbac7c5fe0743e1542766 /gerber
parent45372cfff3d228851e546a2603496db1e499f86b (diff)
downloadgerbonara-820d8aa9034fda56071f3ac2367b80eb0d1cb93a.tar.gz
gerbonara-820d8aa9034fda56071f3ac2367b80eb0d1cb93a.tar.bz2
gerbonara-820d8aa9034fda56071f3ac2367b80eb0d1cb93a.zip
Allowance for weird case modifier with no zero after period
Diffstat (limited to 'gerber')
-rw-r--r--gerber/am_read.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gerber/am_read.py b/gerber/am_read.py
index 872c513..65d08a6 100644
--- a/gerber/am_read.py
+++ b/gerber/am_read.py
@@ -97,6 +97,9 @@ class Scanner:
n = ""
while not self.eof() and (self.peek() in string.digits or self.peek() == "."):
n += self.getc()
+ # weird case where zero is ommited inthe last modifider, like in ',0.'
+ if n == ".":
+ return 0
return float(n)
def readstr(self, end="*"):
@@ -112,7 +115,6 @@ def print_instructions(instructions):
def read_macro(macro):
-
instructions = []
for block in macro.split("*"):