diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-02-26 15:07:20 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-02-27 14:08:02 +0100 |
commit | 24fed9639fa23cb59c56515f60c0000e841ab938 (patch) | |
tree | c725df2eb2bd22476f1b37f7ca20f159b189af85 | |
parent | 501b6c31f65b3906845dab10edbc8b17627c40c9 (diff) | |
download | mupdf-24fed9639fa23cb59c56515f60c0000e841ab938.tar.xz |
Fix fz_expand_rect in presence of empty rectangles.
-rw-r--r-- | source/fitz/geometry.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/fitz/geometry.c b/source/fitz/geometry.c index 775d442a..4c488669 100644 --- a/source/fitz/geometry.c +++ b/source/fitz/geometry.c @@ -546,7 +546,6 @@ fz_expand_irect(fz_irect *a, int expand) fz_rect * fz_expand_rect(fz_rect *a, float expand) { - if (fz_is_empty_rect(a)) return a; if (fz_is_infinite_rect(a)) return a; a->x0 -= expand; a->y0 -= expand; @@ -557,11 +556,11 @@ fz_expand_rect(fz_rect *a, float expand) fz_rect *fz_include_point_in_rect(fz_rect *r, const fz_point *p) { + if (fz_is_infinite_rect(r)) return r; if (p->x < r->x0) r->x0 = p->x; if (p->x > r->x1) r->x1 = p->x; if (p->y < r->y0) r->y0 = p->y; if (p->y > r->y1) r->y1 = p->y; - return r; } |