From 4b2e72c4cd7dc9bc17ad78ca983ff884c1e1ee69 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Thu, 22 Aug 2019 17:53:20 -0400 Subject: Test for direct, rather than resolved nulls in parser Just because we know an indirect reference is null, doesn't mean we shouldn't keep it indirect. --- libqpdf/SparseOHArray.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libqpdf/SparseOHArray.cc') diff --git a/libqpdf/SparseOHArray.cc b/libqpdf/SparseOHArray.cc index 76c7c224..05b44ee0 100644 --- a/libqpdf/SparseOHArray.cc +++ b/libqpdf/SparseOHArray.cc @@ -15,7 +15,7 @@ SparseOHArray::size() const void SparseOHArray::append(QPDFObjectHandle oh) { - if (! oh.isResolvedNull()) + if (! oh.isDirectNull()) { this->elements[this->n_elements] = oh; } @@ -73,7 +73,7 @@ SparseOHArray::setAt(size_t idx, QPDFObjectHandle oh) { throw std::logic_error("bounds error setting item in SparseOHArray"); } - if (oh.isResolvedNull()) + if (oh.isDirectNull()) { this->elements.erase(idx); } -- cgit v1.2.3-54-g00ecf