Browse Source

Prevent current_command_args from bypassing nul (PR#2270)

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

+ 1
- 1
Marlin/Marlin_main.cpp View File

@@ -5279,7 +5279,7 @@ void process_next_command() {
5279 5279
   // Args pointer optimizes code_seen, especially those taking XYZEF
5280 5280
   // This wastes a little cpu on commands that expect no arguments.
5281 5281
   current_command_args = current_command;
5282
-  while (*current_command_args != ' ') ++current_command_args;
5282
+  while (*current_command_args && *current_command_args != ' ') ++current_command_args;
5283 5283
   while (*current_command_args == ' ') ++current_command_args;
5284 5284
 
5285 5285
   // Interpret the code int

Loading…
Cancel
Save