aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-10-18 13:43:05 +0200
committerJay Berkenbilt <ejb@ql.org>2020-10-18 13:43:05 +0200
commitbed165c9fc070d2c483d8cc9bd0e7ac299b29e23 (patch)
tree8ce776a0d080bfcf28d42d91aa2e8e1cbfa0c6fa /libqpdf/QPDF.cc
parent1a888ee3b1eb296a610ddb8e5a28159b8c97ba99 (diff)
downloadqpdf-bed165c9fc070d2c483d8cc9bd0e7ac299b29e23.tar.zst
Stop using InputSource::unreadCh
Diffstat (limited to 'libqpdf/QPDF.cc')
-rw-r--r--libqpdf/QPDF.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index 5aa2d98c..2ebf88b0 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -632,7 +632,7 @@ QPDF::read_xref(qpdf_offset_t xref_offset)
}
else
{
- this->m->file->unreadCh(ch);
+ this->m->file->seek(-1, SEEK_CUR);
done = true;
}
}
@@ -1604,7 +1604,7 @@ QPDF::readObject(PointerHolder<InputSource> input,
// start reading stream data in spite
// of not having seen a newline.
QTC::TC("qpdf", "QPDF stream with CR only");
- input->unreadCh(ch);
+ input->seek(-1, SEEK_CUR);
warn(QPDFExc(
qpdf_e_damaged_pdf,
input->getName(),
@@ -1629,7 +1629,7 @@ QPDF::readObject(PointerHolder<InputSource> input,
else
{
QTC::TC("qpdf", "QPDF stream without newline");
- input->unreadCh(ch);
+ input->seek(-1, SEEK_CUR);
warn(QPDFExc(qpdf_e_damaged_pdf, input->getName(),
this->m->last_object_description,
input->tell(),