From df00b7e2a19231b09a7e880ec3979927ab1bc328 Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Thu, 16 May 2013 20:32:50 +0200 Subject: [PATCH] Don't parse gcodes other than G* (attempt to harden against #303) --- printrun/gcoder.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/printrun/gcoder.py b/printrun/gcoder.py index 9c9a7ba..fffded9 100755 --- a/printrun/gcoder.py +++ b/printrun/gcoder.py @@ -51,6 +51,9 @@ class Line(object): self.is_move = self.command in ["G0", "G1"] def parse_coordinates(self, imperial): + # Not a G-line, we don't want to parse its arguments + if not self.command[0] == "G": + return if imperial: for bit in self.split_raw: code = bit[0]