Commit df00b7e2 authored by Guillaume Seguin's avatar Guillaume Seguin

Don't parse gcodes other than G* (attempt to harden against #303)

parent d2a0163a
...@@ -51,6 +51,9 @@ class Line(object): ...@@ -51,6 +51,9 @@ class Line(object):
self.is_move = self.command in ["G0", "G1"] self.is_move = self.command in ["G0", "G1"]
def parse_coordinates(self, imperial): 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: if imperial:
for bit in self.split_raw: for bit in self.split_raw:
code = bit[0] code = bit[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment