mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-12-11 21:14:34 +00:00
code_value_float tweak
This commit is contained in:
parent
fb3c30e24c
commit
c376f6a2cb
@ -1189,15 +1189,11 @@ inline bool code_has_value() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline float code_value_float() {
|
inline float code_value_float() {
|
||||||
float ret;
|
|
||||||
char* e = strchr(seen_pointer, 'E');
|
char* e = strchr(seen_pointer, 'E');
|
||||||
if (e) {
|
if (!e) return strtod(seen_pointer + 1, NULL);
|
||||||
*e = 0;
|
*e = 0;
|
||||||
ret = strtod(seen_pointer + 1, NULL);
|
float ret = strtod(seen_pointer + 1, NULL);
|
||||||
*e = 'E';
|
*e = 'E';
|
||||||
}
|
|
||||||
else
|
|
||||||
ret = strtod(seen_pointer + 1, NULL);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user