Merge pull request #1585 from galexander1/strtod_e_fix
Fix `code_value` (so `G1X1E2` isn't evaluated as `G1 X100 E2`)
This commit is contained in:
commit
b14be7235e
1 changed files with 6 additions and 1 deletions
|
@ -936,7 +936,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()
|
||||||
|
|
Reference in a new issue