Browse Source

Also nullify spaces before the checksum asterisk (PR#2409)

Scott Lahteine 10 years ago
parent
commit
6b1b8cb2b3
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/Marlin_main.cpp

+ 1
- 1
Marlin/Marlin_main.cpp View File

@@ -5293,7 +5293,7 @@ void process_next_command() {
5293 5293
     while (*current_command == ' ') ++current_command; // skip [ ]*
5294 5294
   }
5295 5295
   char *starpos = strchr(current_command, '*');  // * should always be the last parameter
5296
-  if (starpos) *starpos = '\0';
5296
+  if (starpos) while (*starpos == ' ' || *starpos == '*') *starpos-- = '\0'; // nullify '*' and ' '
5297 5297
 
5298 5298
   // Get the command code, which must be G, M, or T
5299 5299
   char command_code = *current_command;

Loading…
Cancel
Save