2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

Merge pull request #1301 from m-holger/typo

Fix gratuitous calls to bad_subsections in Xref_table::subsections
This commit is contained in:
m-holger 2024-10-29 00:12:30 +00:00 committed by GitHub
commit 54cf0e519c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -493,7 +493,7 @@ Xref_table::subsections(std::string& line)
auto offset = std::get<2>(sub); auto offset = std::get<2>(sub);
file->seek(offset + 20 * toO(count) - 1, SEEK_SET); file->seek(offset + 20 * toO(count) - 1, SEEK_SET);
file->read(line.data(), 1); file->read(line.data(), 1);
if (!(line[0] == '\n' || line[0] == '\n')) { if (!(line[0] == '\n' || line[0] == '\r')) {
return bad_subsections(line, recovery_offset); return bad_subsections(line, recovery_offset);
} }
qpdf_offset_t pos = file->tell(); qpdf_offset_t pos = file->tell();