From 678914be25d8e0c39caae0c02f98fe8cb946dd03 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 6 Jul 2017 14:00:58 -0500 Subject: [PATCH] Patch M23 to work around Simplify3D bug Addressing #7227 --- Marlin/Marlin_main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 6f52f208d7..a2bd4a384c 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -6256,7 +6256,11 @@ inline void gcode_M17() { /** * M23: Open a file */ - inline void gcode_M23() { card.openFile(parser.string_arg, true); } + inline void gcode_M23() { + // Simplify3D includes the size, so zero out all spaces (#7227) + for (char *fn = parser.string_arg; *fn; ++fn) if (*fn == ' ') *fn = '\0'; + card.openFile(parser.string_arg, true); + } /** * M24: Start or Resume SD Print