Browse Source

Prevent current_command_args from bypassing nul (PR#2270)

pull/1/head
Scott Lahteine 10 years ago
committed by Richard Wackerbarth
parent
commit
962b107341
  1. 2
      Marlin/Marlin_main.cpp

2
Marlin/Marlin_main.cpp

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

Loading…
Cancel
Save