diff options
-rw-r--r-- | source/pdf/pdf-op-run.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c index 22e6a4be..73f89fd3 100644 --- a/source/pdf/pdf-op-run.c +++ b/source/pdf/pdf-op-run.c @@ -671,6 +671,13 @@ pdf_show_pattern(pdf_csi *csi, pdf_run_state *pr, pdf_pattern *pat, pdf_gstate * y0 = floorf(fy0 + 0.001); x1 = ceilf(fx1 - 0.001); y1 = ceilf(fy1 - 0.001); + /* The above adjustments cause problems for sufficiently + * large values for xstep/ystep which may be used if the + * pattern is expected to be rendered exactly once. */ + if (fx1 > fx0 && x1 == x0) + x1 = x0 + 1; + if (fy1 > fy0 && y1 == y0) + y1 = y0 + 1; for (y = y0; y < y1; y++) { |