Skip to content

Commit

Permalink
Remove /Prev from trailer (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
ardurin authored Sep 29, 2024
1 parent 69d1258 commit 443ab33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ impl<'a> Reader<'a> {

// Read previous Xrefs of linearized or incremental updated document.
let mut already_seen = HashSet::new();
let mut prev_xref_start = trailer.get(b"Prev").cloned();
let mut prev_xref_start = trailer.remove(b"Prev").ok_or(Error::DictKey);
while let Ok(prev) = prev_xref_start.and_then(|offset| offset.as_i64()) {
if already_seen.contains(&prev) {
break;
Expand Down

0 comments on commit 443ab33

Please sign in to comment.