Skip to content

Commit

Permalink
fix wal reading past allowed offset
Browse files Browse the repository at this point in the history
off-by-one error
  • Loading branch information
MarinPostma committed Sep 23, 2024
1 parent fc3edc3 commit 39a6973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libsql-wal/src/segment/current.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ impl SegmentIndex {
offsets
.iter()
.rev()
.find(|fno| **fno as u64 <= max_offset)
.find(|fno| (**fno as u64) < max_offset)
.copied()
}

Expand Down

0 comments on commit 39a6973

Please sign in to comment.