mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +00:00
svg_loader: fixing 'infinity' handling in svgUtilStrtof
The word 'infinity' was not read to the end due to the pointer shifting.
This commit is contained in:
parent
dbca656ff5
commit
b0991b6ce7
1 changed files with 2 additions and 2 deletions
|
@ -94,8 +94,8 @@ float svgUtilStrtof(const char *nPtr, char **endPtr)
|
|||
if ((tolower(*(iter + 1)) == 'n') && (tolower(*(iter + 2)) == 'f')) iter += 3;
|
||||
else goto error;
|
||||
|
||||
if (tolower(*(iter + 3)) == 'i') {
|
||||
if ((tolower(*(iter + 4)) == 'n') && (tolower(*(iter + 5)) == 'i') && (tolower(*(iter + 6)) == 't') && (tolower(*(iter + 7)) == 'y')) iter += 5;
|
||||
if (tolower(*(iter)) == 'i') {
|
||||
if ((tolower(*(iter + 1)) == 'n') && (tolower(*(iter + 2)) == 'i') && (tolower(*(iter + 3)) == 't') && (tolower(*(iter + 4)) == 'y')) iter += 5;
|
||||
else goto error;
|
||||
}
|
||||
if (endPtr) *endPtr = (char *)(iter);
|
||||
|
|
Loading…
Add table
Reference in a new issue