Skip to content

Commit 42208bc

Browse files
authored
Fix unknown command on empty lines (MarlinFirmware#16867)
1 parent 199a1ba commit 42208bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Marlin/src/gcode/queue.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ void GCodeQueue::get_serial_commands() {
415415

416416
if (serial_char == '\n' || serial_char == '\r') {
417417

418-
process_line_done(serial_input_state[i], serial_line_buffer[i], serial_count[i]);
418+
if (process_line_done(serial_input_state[i], serial_line_buffer[i], serial_count[i])) continue;
419419

420420
char* command = serial_line_buffer[i];
421421

@@ -550,7 +550,7 @@ void GCodeQueue::get_serial_commands() {
550550
else if (n < 0)
551551
SERIAL_ERROR_MSG(MSG_SD_ERR_READ);
552552

553-
process_line_done(sd_input_state, command_buffer[index_w], sd_count);
553+
if (process_line_done(sd_input_state, command_buffer[index_w], sd_count)) continue;
554554

555555
_commit_command(false);
556556

0 commit comments

Comments
 (0)