summaryrefslogtreecommitdiff
path: root/pdf
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-12-30 17:59:13 +0000
committerRobin Watts <robin.watts@artifex.com>2011-12-30 17:59:13 +0000
commit1a389f151b95658edadd79441861cd9c65b00c51 (patch)
tree72dee2d9d9fb8431388b5ed981721652bf0a9e87 /pdf
parent6e146c66cae04ddef6aff60979328b1078c3241a (diff)
downloadmupdf-1a389f151b95658edadd79441861cd9c65b00c51.tar.xz
Correct off by 1 error in outline handling.
When the page number is given by an int, rather than an indirect reference number in a link destination, the page number is already 0 based. Remove the adjustment that I'd been incorrectly doing.
Diffstat (limited to 'pdf')
-rw-r--r--pdf/pdf_annot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pdf/pdf_annot.c b/pdf/pdf_annot.c
index 4fa7f90f..228a214e 100644
--- a/pdf/pdf_annot.c
+++ b/pdf/pdf_annot.c
@@ -53,7 +53,7 @@ pdf_parse_link_dest(pdf_xref *xref, fz_obj *dest)
}
obj = fz_array_get(dest, 0);
if (fz_is_int(obj))
- ld.ld.gotor.page = fz_to_int(obj)-1;
+ ld.ld.gotor.page = fz_to_int(obj);
else
ld.ld.gotor.page = pdf_find_page_number(xref, obj);