From: James Bursa Date: Fri, 24 Sep 2010 23:41:14 +0000 (-0000) Subject: Split the string for stroke-width like it's done for the other attributes so svgtiny_... X-Git-Url: http://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=9730f6727c1ceac012441f5ffb4bce3ab0759526;p=libsvgtiny.git Split the string for stroke-width like it's done for the other attributes so svgtiny_parse_length doesn't get confused about the remainder of the string. Contributed by Peter Korsgaard. svn path=/trunk/libsvgtiny/; revision=10837 --- diff --git a/src/svgtiny.c b/src/svgtiny.c index d87a862..5a6e988 100644 --- a/src/svgtiny.c +++ b/src/svgtiny.c @@ -917,8 +917,10 @@ void svgtiny_parse_paint_attributes(const xmlNode *node, s += 13; while (*s == ' ') s++; - state->stroke_width = svgtiny_parse_length(s, + value = strndup(s, strcspn(s, "; ")); + state->stroke_width = svgtiny_parse_length(value, state->viewport_width, *state); + free(value); } } }