summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qpdf/fix-qdf.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/qpdf/fix-qdf.cc b/qpdf/fix-qdf.cc
index 9992d26c..83632f4d 100644
--- a/qpdf/fix-qdf.cc
+++ b/qpdf/fix-qdf.cc
@@ -297,14 +297,12 @@ QdfFixer::processLines(std::list<std::string>& lines)
void
QdfFixer::checkObjId(std::string const& cur_obj_str)
{
- int cur_obj = QUtil::string_to_int(cur_obj_str.c_str());
- if (cur_obj != last_obj + 1) {
+ if (std::stoi(cur_obj_str) != ++last_obj) {
fatal(
filename + ":" + std::to_string(lineno) + ": expected object " +
- std::to_string(last_obj + 1));
+ std::to_string(last_obj));
}
- last_obj = cur_obj;
- xref.push_back(QPDFXRefEntry(1, QIntC::to_offset(last_offset), 0));
+ xref.push_back(QPDFXRefEntry(1, last_offset, 0));
}
void