From 1d2c0c2f99a8dbe726f4ac6b080761c290698fae Mon Sep 17 00:00:00 2001 From: m-holger Date: Thu, 7 Nov 2024 16:40:43 +0000 Subject: [PATCH] Fix QPDF::getAllPagesInternal warning Provide correct obj_gen. --- libqpdf/QPDF_pages.cc | 2 +- qpdf/qtest/qpdf/pages-loop.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libqpdf/QPDF_pages.cc b/libqpdf/QPDF_pages.cc index f46719d9..f334f35f 100644 --- a/libqpdf/QPDF_pages.cc +++ b/libqpdf/QPDF_pages.cc @@ -94,7 +94,7 @@ QPDF::getAllPagesInternal( throw QPDFExc( qpdf_e_pages, m->file->getName(), - m->last_object_description, + "object " + cur_node.getObjGen().unparse(' '), 0, "Loop detected in /Pages structure (getAllPages)"); } diff --git a/qpdf/qtest/qpdf/pages-loop.out b/qpdf/qtest/qpdf/pages-loop.out index dddfc649..e81a219b 100644 --- a/qpdf/qtest/qpdf/pages-loop.out +++ b/qpdf/qtest/qpdf/pages-loop.out @@ -2,5 +2,5 @@ checking pages-loop.pdf PDF Version: 1.3 File is not encrypted File is not linearized -ERROR: pages-loop.pdf (object 3 0): Loop detected in /Pages structure (getAllPages) +ERROR: pages-loop.pdf (object 2 0): Loop detected in /Pages structure (getAllPages) qpdf: errors detected