commit - 06ed0943b4ffd56be1323c336f0cb52379ccd6d1
commit + f0c8a4732e52479072004950a488c09a892c0d58
blob - b3101781628c5c931c9a0750970592b9f7721710
blob + a7697b557e16a68b17e9e2d35c808a22d0e509fa
--- pdf.c
+++ pdf.c
/* find the last trailer dictionary */
if (aux->nxrefs == 0)
return;
- tok = aux->xrefs[aux->nxrefs - 1]; /* last xref section */
+ tok = aux->xrefs[0]; /* first element is latest (reverse order) */
trailer = H_INDEX(Dict, tok, 1);
/* fetch Size (a required field) from the trailer dictionary */