-
-
Save baskerville/2f883303bb81c3ecd68d1478a9a8394e to your computer and use it in GitHub Desktop.
mupdf: svg transform attribute: let commas be optional
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d927e24b0143878362d26a7e9173a9f0df138a71 Mon Sep 17 00:00:00 2001 | |
From: Bastien Dejean <nihilhill@gmail.com> | |
Date: Thu, 18 May 2017 17:10:56 +0200 | |
Subject: [PATCH] Commas are optional | |
--- | |
source/svg/svg-parse.c | 6 +----- | |
1 file changed, 1 insertion(+), 5 deletions(-) | |
diff --git a/source/svg/svg-parse.c b/source/svg/svg-parse.c | |
index 56f2a1cf..2de6c3f6 100644 | |
--- a/source/svg/svg-parse.c | |
+++ b/source/svg/svg-parse.c | |
@@ -177,12 +177,8 @@ svg_parse_transform(fz_context *ctx, svg_document *doc, char *str, fz_matrix *tr | |
nargs = 0; | |
while (*str && *str != ')' && nargs < 6) | |
{ | |
- if (nargs > 0) | |
- { | |
- if (*str != ',') | |
- fz_throw(ctx, FZ_ERROR_GENERIC, "syntax error in transform attribute - no comma between numbers"); | |
+ if (nargs > 0 && *str == ',') | |
str ++; | |
- } | |
while (svg_is_whitespace(*str)) | |
str ++; | |
-- | |
2.11.0 (Apple Git-81) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment