diff --git a/crates/core/src/io/line_index.rs b/crates/core/src/io/line_index.rs index 0ba2fcd..eac43b4 100644 --- a/crates/core/src/io/line_index.rs +++ b/crates/core/src/io/line_index.rs @@ -233,7 +233,7 @@ impl LineIndex { } let block = idx / BLOCK_SIZE; let offset_in_block = idx % BLOCK_SIZE; - let mut pos = self.sampled_offsets[block] as usize; + let mut pos = (*self.sampled_offsets.get(block)?) as usize; for _ in 0..offset_in_block { match memchr::memchr(b'\n', &data[pos..]) { Some(rel) => pos = pos + rel + 1,