summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/pdf/pdf-xref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index c99f8350..549809a2 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -658,8 +658,8 @@ pdf_xref_find_subsection(pdf_document *doc, int ofs, int len)
else
{
/* Case 3 */
- ensure_solid_xref(doc, new_max, 0);
- xref = &doc->xref_sections[0];
+ ensure_solid_xref(doc, new_max, doc->num_xref_sections-1);
+ xref = &doc->xref_sections[doc->num_xref_sections-1];
sub = xref->subsec;
}
return &sub->table[ofs-sub->start];