]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/xpdf/XRef.cc
(eog_hig_dialog_new): add terminating NULL in g_object_set.
[evince.git] / pdf / xpdf / XRef.cc
index 901caa596b3acd7cb9f56a28e8e4a1406664046a..56cb131c00251cd0fd5bf16379f7a2d8de4464ba 100644 (file)
@@ -2,7 +2,7 @@
 //
 // XRef.cc
 //
-// Copyright 1996-2002 Glyph & Cog, LLC
+// Copyright 1996-2003 Glyph & Cog, LLC
 //
 //========================================================================
 
@@ -325,6 +325,11 @@ GBool XRef::readXRef(Guint *pos) {
   if (obj2.isInt()) {
     *pos = (Guint)obj2.getInt();
     more = gTrue;
+  } else if (obj2.isRef()) {
+    // certain buggy PDF generators generate "/Prev NNN 0 R" instead
+    // of "/Prev NNN"
+    *pos = (Guint)obj2.getRefNum();
+    more = gTrue;
   } else {
     more = gFalse;
   }