summaryrefslogtreecommitdiff
path: root/source/html
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-02-24 13:47:53 +0100
committerTor Andersson <tor.andersson@artifex.com>2017-03-01 15:22:46 +0100
commit1a477e24692b72b65f2e21aabbe839eea45e6991 (patch)
tree00c756186b0937f917d77bd363a7c5ebda574e1b /source/html
parent53f816f2f06de5aeb13cac72232c4f52714201cb (diff)
downloadmupdf-1a477e24692b72b65f2e21aabbe839eea45e6991.tar.xz
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.
Diffstat (limited to 'source/html')
-rw-r--r--source/html/html-layout.c4
1 files 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)
{