Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Fix out of bounds table offset panic #459

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/widgets/table.rs
Expand Up @@ -334,6 +334,7 @@ impl<'a> Table<'a> {
offset: usize,
max_height: u16,
) -> (usize, usize) {
let offset = offset.min(self.rows.len().saturating_sub(1));
let mut start = offset;
let mut end = offset;
let mut height = 0;
Expand Down