X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fsvgtiny.c;h=69cbcf7125b2f7ae540d5743e40be7d0edf3200f;hb=d5060009e934f2715a35601f7e4192702a473216;hp=efac78882da2185d0cfea1b13a880f994bc72d83;hpb=1e71d0472529b96ac35e2e4425b66e29146a01c1;p=libsvgtiny.git diff --git a/src/svgtiny.c b/src/svgtiny.c index efac788..69cbcf7 100644 --- a/src/svgtiny.c +++ b/src/svgtiny.c @@ -20,6 +20,9 @@ #include "svgtiny.h" #include "svgtiny_internal.h" +/* Source file generated by `gperf`. */ +#include "autogenerated_colors.c" + #ifndef M_PI #define M_PI 3.14159265358979323846 #endif @@ -574,7 +577,7 @@ svgtiny_code svgtiny_parse_path(dom_element *path, p[i++] = last_cubic_y = last_quad_y = last_y = y; s += n; - } while (sscanf(s, "%f %n", &x, &n) == 1); + } while (sscanf(s, "%f %n", &y, &n) == 1); /* curveto (C, c) (6 arguments) */ } else if (sscanf(s, " %1[Cc] %f %f %f %f %f %f %n", command, @@ -1589,6 +1592,7 @@ void svgtiny_parse_transform(char *s, float *ma, float *mb, a = d = 1; b = c = 0; e = f = 0; + n = 0; if ((sscanf(s, " matrix (%f %f %f %f %f %f ) %n", &a, &b, &c, &d, &e, &f, &n) == 6) && (n > 0)) ;