summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2010-09-24 23:41:14 (GMT)
committer James Bursa <james@netsurf-browser.org>2010-09-24 23:41:14 (GMT)
commit9730f6727c1ceac012441f5ffb4bce3ab0759526 (patch)
tree2857f21e7cdd7c24ff4e89c57e8ebb836b87116b
parent7d0c75c39fcddcfe477f58403fd3c95d5e4f873b (diff)
downloadlibsvgtiny-9730f6727c1ceac012441f5ffb4bce3ab0759526.tar.gz
libsvgtiny-9730f6727c1ceac012441f5ffb4bce3ab0759526.tar.bz2
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
-rw-r--r--src/svgtiny.c4
1 files changed, 3 insertions, 1 deletions
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);
}
}
}