diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-03-12 14:13:48 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-03-12 14:13:48 +0000 |
commit | bc9e8f1d6c18b8b37678a07e9266f269fe5bf0dc (patch) | |
tree | 73be383b57ee4726f2a272ddeb9f6e895390aff2 /draw/draw_scale.c | |
parent | 3db3054ec8223b6bd01d8d8144b4863c9ca8fd2d (diff) | |
parent | caf8e7a6c7cfeb245cdb5ac44d310a82ab0155b3 (diff) | |
download | mupdf-bc9e8f1d6c18b8b37678a07e9266f269fe5bf0dc.tar.xz |
Merge branch 'master' into header-split
Diffstat (limited to 'draw/draw_scale.c')
-rw-r--r-- | draw/draw_scale.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/draw/draw_scale.c b/draw/draw_scale.c index fb7caffd..aceec939 100644 --- a/draw/draw_scale.c +++ b/draw/draw_scale.c @@ -349,16 +349,8 @@ add_weight(fz_weights *weights, int j, int i, fz_scale_filter *filter, weight = (int)(256*f+0.5f); /* Ensure i is in range */ - if (i < 0) - { - i = 0; + if (i < 0 || i >= src_w) return; - } - else if (i >= src_w) - { - i = src_w-1; - return; - } if (weight == 0) { /* We add a fudge factor here to allow for extreme downscales |