diff --git a/cnc_ctrl_v1/GCode.cpp b/cnc_ctrl_v1/GCode.cpp index 826f7228..dc8b86df 100644 --- a/cnc_ctrl_v1/GCode.cpp +++ b/cnc_ctrl_v1/GCode.cpp @@ -566,6 +566,9 @@ void sanitizeCommandString(String& cmdString){ cmdString.remove(pos, 1); if (line_flags & LINE_FLAG_COMMENT_PARENTHESES) { line_flags &= ~(LINE_FLAG_COMMENT_PARENTHESES); } } + else { + cmdString.remove(pos, 1); + } } else { if (cmdString[pos] < ' ') {