From 9730f6727c1ceac012441f5ffb4bce3ab0759526 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Fri, 24 Sep 2010 23:41:14 +0000 Subject: 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 --- src/svgtiny.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } } } -- cgit v1.2.3