Browse Source

fix bug where, i.e., "G1X1E1" would be interpretted as "G1 X10 E1",

because strtod() will read the E address value as if it was a base 10
exponent.
pull/1/head
Greg Alexander 10 years ago
parent
commit
3e8c5678f5
  1. 7
      Marlin/Marlin_main.cpp

7
Marlin/Marlin_main.cpp

@ -909,7 +909,12 @@ void get_command()
float code_value() float code_value()
{ {
return (strtod(strchr_pointer + 1, NULL)); float ret;
char *e = strchr(strchr_pointer, 'E');
if (e != NULL) *e = 0;
ret = strtod(strchr_pointer+1, NULL);
if (e != NULL) *e = 'E';
return ret;
} }
long code_value_long() long code_value_long()

Loading…
Cancel
Save