From b052ca548e30203bea458c470f2b43de223ad747 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 23 Oct 2009 17:00:49 +0000 Subject: [PATCH] logico git-svn-id: svn+q:///qpdf/trunk@896 71b93d88-0707-0410-a8cf-f5a4172ac649 --- qpdf/qpdf-ctest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qpdf/qpdf-ctest.c b/qpdf/qpdf-ctest.c index bdfca3c9..bcdc56fc 100644 --- a/qpdf/qpdf-ctest.c +++ b/qpdf/qpdf-ctest.c @@ -18,9 +18,10 @@ static void report_errors() printf(" pos : %ld\n", qpdf_get_error_file_position(qpdf, e)); printf(" text: %s\n", qpdf_get_error_message_detail(qpdf, e)); } - e = qpdf_get_error(qpdf); if (qpdf_has_error(qpdf)) { + e = qpdf_get_error(qpdf); + assert(qpdf_has_error(qpdf) == QPDF_FALSE); printf("error: %s\n", qpdf_get_error_full_text(qpdf, e)); printf(" code: %d\n", qpdf_get_error_code(qpdf, e)); printf(" file: %s\n", qpdf_get_error_filename(qpdf, e)); @@ -29,6 +30,7 @@ static void report_errors() } else { + e = qpdf_get_error(qpdf); assert(e == 0); assert(qpdf_get_error_code(qpdf, e) == qpdf_e_success); (void)qpdf_get_error_full_text(qpdf, e);