From 1a477e24692b72b65f2e21aabbe839eea45e6991 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 24 Feb 2017 13:47:53 +0100 Subject: Don't truncate page height when loading links. We accidentally used int for the page height when loading links, and in the case where the page dimension is not an integer number of points that would lead to rounding accumulation errors in the resulting bounding boxes. --- source/html/html-layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/html/html-layout.c b/source/html/html-layout.c index 5793de0e..96d2334b 100644 --- a/source/html/html-layout.c +++ b/source/html/html-layout.c @@ -1937,7 +1937,7 @@ static int has_same_href(fz_html_box *box, const char *old_href) return 0; } -static fz_link *load_link_flow(fz_context *ctx, fz_html_flow *flow, fz_link *head, int page, int page_h, const char *dir, const char *file) +static fz_link *load_link_flow(fz_context *ctx, fz_html_flow *flow, fz_link *head, int page, float page_h, const char *dir, const char *file) { fz_link *link; fz_html_flow *next; @@ -2007,7 +2007,7 @@ static fz_link *load_link_flow(fz_context *ctx, fz_html_flow *flow, fz_link *hea return head; } -static fz_link *load_link_box(fz_context *ctx, fz_html_box *box, fz_link *head, int page, int page_h, const char *dir, const char *file) +static fz_link *load_link_box(fz_context *ctx, fz_html_box *box, fz_link *head, int page, float page_h, const char *dir, const char *file) { while (box) { -- cgit v1.2.3