From 22fc59ab5973aa91cc2fed68792dce521cc70c93 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 23 Mar 2021 01:03:32 -0500 Subject: [PATCH] Minor process_subcommands_now followup --- Marlin/src/gcode/gcode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 6290d7a1d..aa206bfeb 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -1049,8 +1049,8 @@ void GcodeSuite::process_subcommands_now(char * gcode) { if (delim) *delim = '\0'; // Replace with nul parser.parse(gcode); // Parse the current command process_parsed_command(true); // Process it - if (delim) *delim = '\n'; // Put back the newline if (!delim) break; // Last command? + *delim = '\n'; // Put back the newline gcode = delim + 1; // Get the next command } parser.parse(saved_cmd); // Restore the parser state