Browse Source

Improve code_has_value test

pull/1/head
Scott Lahteine 9 years ago
parent
commit
56ff46eb8b
  1. 7
      Marlin/Marlin_main.cpp

7
Marlin/Marlin_main.cpp

@ -890,8 +890,11 @@ void get_command() {
}
bool code_has_value() {
char c = strchr_pointer[1];
return (c >= '0' && c <= '9') || c == '-' || c == '+' || c == '.';
int i = 1;
char c = strchr_pointer[i];
if (c == '-' || c == '+') c = strchr_pointer[++i];
if (c == '.') c = strchr_pointer[++i];
return (c >= '0' && c <= '9');
}
float code_value() {

Loading…
Cancel
Save