|
@@ -1102,7 +1102,7 @@ static double nsvg__atof(const char* s)
|
|
|
// Parse integer part
|
|
|
if (nsvg__isdigit(*cur)) {
|
|
|
// Parse digit sequence
|
|
|
- intPart = (double)strtoll(cur, &end, 10);
|
|
|
+ intPart = strtoll(cur, &end, 10);
|
|
|
if (cur != end) {
|
|
|
res = (double)intPart;
|
|
|
hasIntPart = 1;
|
|
@@ -1130,7 +1130,7 @@ static double nsvg__atof(const char* s)
|
|
|
|
|
|
// Parse optional exponent
|
|
|
if (*cur == 'e' || *cur == 'E') {
|
|
|
- int expPart = 0;
|
|
|
+ long expPart = 0;
|
|
|
cur++; // skip 'E'
|
|
|
expPart = strtol(cur, &end, 10); // Parse digit sequence with sign
|
|
|
if (cur != end) {
|
|
@@ -1168,7 +1168,7 @@ static const char* nsvg__parseNumber(const char* s, char* it, const int size)
|
|
|
}
|
|
|
}
|
|
|
// exponent
|
|
|
- if (*s == 'e' || *s == 'E') {
|
|
|
+ if ((*s == 'e' || *s == 'E') && (s[1] != 'm' && s[1] != 'x')) {
|
|
|
if (i < last) it[i++] = *s;
|
|
|
s++;
|
|
|
if (*s == '-' || *s == '+') {
|