diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2022-09-06 12:22:43 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2022-09-07 08:54:28 +0100 |
commit | 38765ba214ad56dab4a7e37000c01df45ea3f5ad (patch) | |
tree | 0001f27a973d1dfe459974ae6b5dc83603da0a7d | |
parent | 8d30023842e59a9af26844e6172f8413ff51d7fb (diff) | |
download | ghostpdl-38765ba214ad56dab4a7e37000c01df45ea3f5ad.tar.gz |
Bug 705702 continued: Extend fix to other tiling types too.
The previous fix was correct, but left the potential problem
open for other tiling types. Move/refine the test a bit to ensure
it works for all types.
-rw-r--r-- | base/gsptype1.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/base/gsptype1.c b/base/gsptype1.c index a7fa20c54..2e0327162 100644 --- a/base/gsptype1.c +++ b/base/gsptype1.c @@ -227,13 +227,14 @@ gs_pattern1_make_pattern(gs_client_color * pcc, * losing content. */ inst.size.x = (int)floor(bbw+0.5); inst.size.y = (int)floor(bbh+0.5); - /* Ensure we never round down to 0. Or below zero (bug 705768). */ - if (bbw > 0 && inst.size.x <= 0) - inst.size.x = 1; - if (bbh > 0 && inst.size.y <= 0) - inst.size.y = 1; } + /* Ensure we never round down to 0. Or below zero (bug 705768). */ + if (inst.size.x <= 0) + inst.size.x = bbw > 0 ? 1 : 0; + if (inst.size.y <= 0) + inst.size.y = bbh > 0 ? 1 : 0; + /* After compute_inst_matrix above, we are guaranteed that * inst.step_matrix.xx > 0 and inst.step_matrix.yy > 0. * Similarly, we are guaranteed that inst.size.x >= 0 and |