Update nanosvg.h
This commit is contained in:
Mikko Mononen 2020-11-20 12:53:11 +02:00 committed by GitHub
commit 3e403ec72a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1473,8 +1473,8 @@ static int nsvg__isCoordinate(const char* s)
// optional sign // optional sign
if (*s == '-' || *s == '+') if (*s == '-' || *s == '+')
s++; s++;
// must have at least one digit // must have at least one digit, or start by a dot
return nsvg__isdigit(*s); return (nsvg__isdigit(*s) || *s == '.');
} }
static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str) static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str)