diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-12 09:52:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-12 09:52:47 +0100 |
commit | cbc5d9405fda9ebbd265843ad2000e67bc3cbebe (patch) | |
tree | f6ac917d4c4c534ea76a9eebce4edd8fadf978a0 /thirdparty | |
parent | 604891a87d732dc37f79b4c4e289eaa57f52e5a4 (diff) | |
parent | 097b746fddee5550acb3f0fab5887aeba7c8038e (diff) |
Merge pull request #33562 from akien-mga/nanosvg-25241c5
nanosvg: Sync with upstream c1f6e20
Diffstat (limited to 'thirdparty')
-rw-r--r-- | thirdparty/README.md | 2 | ||||
-rw-r--r-- | thirdparty/nanosvg/nanosvg.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/thirdparty/README.md b/thirdparty/README.md index b7ff16c432..b9a02dbe0a 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -385,7 +385,7 @@ Collection of single-file libraries used in Godot components. ## nanosvg - Upstream: https://github.com/memononen/nanosvg -- Version: git (c1f6e20, 2018) +- Version: git (25241c5, 2019) - License: zlib Files extracted from the upstream source: 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 == '+') { |