]> gitweb.michael.orlitzky.com - libsvgtiny.git/blobdiff - src/svgtiny.c
Fix parsing of multiple vertical lineto commands
[libsvgtiny.git] / src / svgtiny.c
index 4661a58a2dffb17db793d22f9cff275575cec120..69cbcf7125b2f7ae540d5743e40be7d0edf3200f 100644 (file)
@@ -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,