common Util: Move to before decimal part calculation

This commit is contained in:
JunsuChoi 2022-12-13 11:53:50 +09:00 committed by Hermet Park
parent 439c918553
commit 1769e1c4af

View file

@ -137,11 +137,13 @@ float svgUtilStrtof(const char *nPtr, char **endPtr)
pow10 *= 10ULL;
}
}
} else if (isspace(*iter)) { //skip if there is a space after the dot.
a = iter;
goto success;
}
val += static_cast<float>(decimalPart) / static_cast<float>(pow10);
a = iter;
//skip if there is a space after the dot.
if (isspace(*a)) goto success;
}
//Optional: exponent