]> gitweb.michael.orlitzky.com - libsvgtiny.git/commitdiff
Fix parsing of multiple vertical lineto commands
authorMichael Drake <tlsa@netsurf-browser.org>
Mon, 24 Jul 2017 13:18:53 +0000 (14:18 +0100)
committerMichael Drake <tlsa@netsurf-browser.org>
Mon, 24 Jul 2017 13:18:53 +0000 (14:18 +0100)
Thanks to Nils for spotting this.

src/svgtiny.c

index bbefb888a2630c00e5bbd9bf7189e7523e68c3d9..69cbcf7125b2f7ae540d5743e40be7d0edf3200f 100644 (file)
@@ -577,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,