summaryrefslogtreecommitdiff
path: root/base/gsptype1.c
diff options
context:
space:
mode:
Diffstat (limited to 'base/gsptype1.c')
-rw-r--r--base/gsptype1.c11
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