From 2eb72175ba0436890fbaf014a9344256bda778f7 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 23 May 2019 14:23:09 +0200 Subject: [PATCH] Update nanosvg library to current upstream version See README.bundled-libs.txt --- README.bundled-libs.txt | 2 +- nanosvg/nanosvg.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.bundled-libs.txt b/README.bundled-libs.txt index dd4ef8d76..1a3969396 100644 --- a/README.bundled-libs.txt +++ b/README.bundled-libs.txt @@ -17,7 +17,7 @@ Current versions of bundled libraries: Library Version Release date FLTK Version ------------------------------------------------------------------ jpeg jpeg-9c 2018-01-14 1.4.0 - nanosvg e62285a43b [1] 2019-01-31 1.4.0 + nanosvg f31098fa85 [1] 2019-05-23 1.4.0 png libpng-1.6.34 2017-09-29 1.4.0 zlib zlib-1.2.11 2017-01-15 1.4.0 diff --git a/nanosvg/nanosvg.h b/nanosvg/nanosvg.h index f8e38e8fe..cfff38f89 100644 --- a/nanosvg/nanosvg.h +++ b/nanosvg/nanosvg.h @@ -286,7 +286,7 @@ static void nsvg__parseElement(char* s, // Get attribs while (!end && *s && nattr < NSVG_XML_MAX_ATTRIBS-3) { - char* tag = NULL; + char* name = NULL; char* value = NULL; // Skip white space before the attrib name @@ -296,7 +296,7 @@ static void nsvg__parseElement(char* s, end = 1; break; } - tag = s; + name = s; // Find end of the attrib name. while (*s && !nsvg__isspace(*s) && *s != '=') s++; if (*s) { *s++ = '\0'; } @@ -311,8 +311,8 @@ static void nsvg__parseElement(char* s, if (*s) { *s++ = '\0'; } // Store only well formed attributes - if (tag && value) { - attr[nattr++] = tag; + if (name && value) { + attr[nattr++] = name; attr[nattr++] = value; } } @@ -1176,7 +1176,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 == '+') {