diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-11-21 15:57:47 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-11-21 16:49:31 +0000 |
commit | ca19703811bd41bd2638d7d8678d1702aa56844f (patch) | |
tree | 1d40b4a60e68e105108b40ce8a4ad5488f20c198 /fitz | |
parent | 17db20e94e9973ed76b033fbe30afc3fed20e5b6 (diff) | |
download | mupdf-ca19703811bd41bd2638d7d8678d1702aa56844f.tar.xz |
Bug 693458: Fix subscaler logic.
Once again, thanks to zeniko for pointing this out. With non-monochrome
scales, the 'stray' cases at the end of the line will loop 0 times on x.
resulting in a skewed result.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/res_pixmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fitz/res_pixmap.c b/fitz/res_pixmap.c index be0196dd..fdbc38e0 100644 --- a/fitz/res_pixmap.c +++ b/fitz/res_pixmap.c @@ -936,7 +936,7 @@ fz_subsample_pixmap(fz_context *ctx, fz_pixmap *tile, int factor) for (nn = n; nn > 0; nn--) { int v = 0; - for (;x > 0; x--) + for (xx = x; xx > 0; xx--) { for (yy = f; yy > 0; yy--) { @@ -985,9 +985,9 @@ fz_subsample_pixmap(fz_context *ctx, fz_pixmap *tile, int factor) for (nn = n; nn > 0; nn--) { int v = 0; - for (;x > 0; x--) + for (xx = x; xx > 0; xx--) { - for (; y > 0; y--) + for (yy = y; yy > 0; yy--) { v += *s; s += fwd; |