summaryrefslogtreecommitdiff
path: root/gerber/am_read.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerber/am_read.py')
-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("*"):