Merge pull request #5680 from thinkyhead/rc_configs_puhlease

code_value_float tweak
This commit is contained in:
Scott Lahteine 2017-01-12 05:22:47 -08:00 committed by GitHub
commit 7743849608

View file

@ -1189,15 +1189,11 @@ inline bool code_has_value() {
}
inline float code_value_float() {
float ret;
char* e = strchr(seen_pointer, 'E');
if (e) {
*e = 0;
ret = strtod(seen_pointer + 1, NULL);
*e = 'E';
}
else
ret = strtod(seen_pointer + 1, NULL);
if (!e) return strtod(seen_pointer + 1, NULL);
*e = 0;
float ret = strtod(seen_pointer + 1, NULL);
*e = 'E';
return ret;
}