Commit 1eb5df92f49111e2ef1b9d0d8f12b849720b08c6
1 parent
c648b9a0
Fix gratuitous calls to bad_subsections in Xref_table::subsections
Showing
1 changed file
with
1 additions
and
1 deletions
libqpdf/QPDF_objects.cc
| @@ -493,7 +493,7 @@ Xref_table::subsections(std::string& line) | @@ -493,7 +493,7 @@ Xref_table::subsections(std::string& line) | ||
| 493 | auto offset = std::get<2>(sub); | 493 | auto offset = std::get<2>(sub); |
| 494 | file->seek(offset + 20 * toO(count) - 1, SEEK_SET); | 494 | file->seek(offset + 20 * toO(count) - 1, SEEK_SET); |
| 495 | file->read(line.data(), 1); | 495 | file->read(line.data(), 1); |
| 496 | - if (!(line[0] == '\n' || line[0] == '\n')) { | 496 | + if (!(line[0] == '\n' || line[0] == '\r')) { |
| 497 | return bad_subsections(line, recovery_offset); | 497 | return bad_subsections(line, recovery_offset); |
| 498 | } | 498 | } |
| 499 | qpdf_offset_t pos = file->tell(); | 499 | qpdf_offset_t pos = file->tell(); |