Browse Source

Minor process_subcommands_now followup

Scott Lahteine 3 years ago
parent
commit
22fc59ab59
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/gcode/gcode.cpp

+ 1
- 1
Marlin/src/gcode/gcode.cpp View File

@@ -1049,8 +1049,8 @@ void GcodeSuite::process_subcommands_now(char * gcode) {
1049 1049
     if (delim) *delim = '\0';                         // Replace with nul
1050 1050
     parser.parse(gcode);                              // Parse the current command
1051 1051
     process_parsed_command(true);                     // Process it
1052
-    if (delim) *delim = '\n';                         // Put back the newline
1053 1052
     if (!delim) break;                                // Last command?
1053
+    *delim = '\n';                                    // Put back the newline
1054 1054
     gcode = delim + 1;                                // Get the next command
1055 1055
   }
1056 1056
   parser.parse(saved_cmd);                            // Restore the parser state

Loading…
Cancel
Save