From 42208bc031aae9761d512183c554763df41a34cb Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun, 16 Feb 2020 08:10:20 +0100 Subject: [PATCH] Fix unknown command on empty lines (#16867) --- Marlin/src/gcode/queue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index 4d0861c2b..eca6d5cb1 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -415,7 +415,7 @@ void GCodeQueue::get_serial_commands() { if (serial_char == '\n' || serial_char == '\r') { - process_line_done(serial_input_state[i], serial_line_buffer[i], serial_count[i]); + if (process_line_done(serial_input_state[i], serial_line_buffer[i], serial_count[i])) continue; char* command = serial_line_buffer[i]; @@ -550,7 +550,7 @@ void GCodeQueue::get_serial_commands() { else if (n < 0) SERIAL_ERROR_MSG(MSG_SD_ERR_READ); - process_line_done(sd_input_state, command_buffer[index_w], sd_count); + if (process_line_done(sd_input_state, command_buffer[index_w], sd_count)) continue; _commit_command(false);