mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
common Util: Skip if there is a space after the dot
Some SVG parsers allow parsing of "0." If there is a space after the dot, skip to the next step.
This commit is contained in:
parent
4bdb58a8ca
commit
439c918553
1 changed files with 2 additions and 0 deletions
|
@ -140,6 +140,8 @@ float svgUtilStrtof(const char *nPtr, char **endPtr)
|
|||
}
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue