From 318a16637bd9dacae046706bcc0f70cdae20a33c Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Wed, 11 Mar 2020 17:15:33 -0500
Subject: [PATCH] Fix M810 macro multiple use

Fixes #17125
---
 Marlin/src/gcode/gcode.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp
index e53a17eeb01..e58ca5b15be 100644
--- a/Marlin/src/gcode/gcode.cpp
+++ b/Marlin/src/gcode/gcode.cpp
@@ -930,6 +930,7 @@ void GcodeSuite::process_subcommands_now(char * gcode) {
     char * const delim = strchr(gcode, '\n');         // Get address of next newline
     if (delim) *delim = '\0';                         // Replace with nul
     parser.parse(gcode);                              // Parse the current command
+    if (delim) *delim = '\n';                         // Put back the newline
     process_parsed_command(true);                     // Process it
     if (!delim) break;                                // Last command?
     gcode = delim + 1;                                // Get the next command