From a6c186245075efa2af2acf7b736a1c8f0d0d90f6 Mon Sep 17 00:00:00 2001 From: Garret Fick Date: Sat, 19 Mar 2016 11:28:45 +0800 Subject: Correctly handle empty command statements --- gerber/rs274x.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gerber/rs274x.py b/gerber/rs274x.py index 4ab5472..692ce71 100644 --- a/gerber/rs274x.py +++ b/gerber/rs274x.py @@ -306,6 +306,12 @@ class GerberParser(object): while did_something and len(line) > 0: did_something = False + # consume empty data blocks + if line[0] == '*': + line = line[1:] + did_something = True + continue + # coord (coord, r) = _match_one(self.COORD_STMT, line) if coord: -- cgit