summaryrefslogtreecommitdiff
path: root/thirdparty/nanosvg/nanosvg.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-11-12 09:12:11 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-11-12 09:12:11 +0100
commit097b746fddee5550acb3f0fab5887aeba7c8038e (patch)
tree9e9b5bfe43a9c62101076ad941b2f5148749d4d9 /thirdparty/nanosvg/nanosvg.h
parent1d0bd3eb71c8c7905f12dd9c5490f2560d07db78 (diff)
nanosvg: Sync with upstream c1f6e20
Now formally unmaintained, so probably no further sync to expect from this repository.
Diffstat (limited to 'thirdparty/nanosvg/nanosvg.h')
-rw-r--r--thirdparty/nanosvg/nanosvg.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/thirdparty/nanosvg/nanosvg.h b/thirdparty/nanosvg/nanosvg.h
index 8c8b061cd1..e5f6900614 100644
--- a/thirdparty/nanosvg/nanosvg.h
+++ b/thirdparty/nanosvg/nanosvg.h
@@ -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 == '+') {