Update nanosvg library to current upstream version

See README.bundled-libs.txt
This commit is contained in:
Albrecht Schlosser 2019-05-23 14:23:09 +02:00
parent 46fa9d2625
commit 2eb72175ba
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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 == '+') {