From 6b1b8cb2b382d1b1d6a53337b59a91ab518b971b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 9 Jul 2015 15:02:16 -0700 Subject: [PATCH] Also nullify spaces before the checksum asterisk (PR#2409) --- Marlin/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 0732a1cfa..0d4ddc9ec 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5293,7 +5293,7 @@ void process_next_command() { while (*current_command == ' ') ++current_command; // skip [ ]* } char *starpos = strchr(current_command, '*'); // * should always be the last parameter - if (starpos) *starpos = '\0'; + if (starpos) while (*starpos == ' ' || *starpos == '*') *starpos-- = '\0'; // nullify '*' and ' ' // Get the command code, which must be G, M, or T char command_code = *current_command;