diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-11-24 13:22:12 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-12-11 11:47:26 +0100 |
commit | 6b0f4f79cdac06fe790830331bb2b41d8a9a204b (patch) | |
tree | abc4093145a46ded62e86fed7ef3035809cb6903 /source/xps/xps-path.c | |
parent | 00d37073c7e1c160d22adfe88f594386cd33ffb7 (diff) | |
download | mupdf-6b0f4f79cdac06fe790830331bb2b41d8a9a204b.tar.xz |
xps: Simplify infinite loop check.
Diffstat (limited to 'source/xps/xps-path.c')
-rw-r--r-- | source/xps/xps-path.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/xps/xps-path.c b/source/xps/xps-path.c index 85910905..de078251 100644 --- a/source/xps/xps-path.c +++ b/source/xps/xps-path.c @@ -439,11 +439,9 @@ xps_parse_abbreviated_geometry(fz_context *ctx, xps_document *doc, char *geom, i break; default: - /* eek */ fz_warn(ctx, "ignoring invalid command '%c'", cmd); - /* Skip any trailing numbers to avoid an infinite loop */ - while (i < n && (args[i][0] == '+' || args[i][0] == '.' || args[i][0] == '-' || (args[i][0] >= '0' && args[i][0] <= '9'))) - i ++; + if (old == cmd) /* avoid infinite loop */ + i++; break; } |