Split the string like it's done for the other attributes so
svgtiny_parse_length doesn't get confused about the remainder of the
string.

Signed-off-by: Peter Korsgaard <[email protected]>
---
 src/svgtiny.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/svgtiny.c b/src/svgtiny.c
index a6dbd89..7a07b61 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);
                        }
                }
        }
-- 
1.7.1


Reply via email to