Fix off-by-one error when selecting next index

This commit is contained in:
Hanno Braun 2024-12-10 18:58:10 +01:00
parent b3622693a5
commit ccf6d9a1d1

View File

@ -28,7 +28,7 @@ impl OperationView {
}
pub fn select_next(&mut self) {
if self.selected < self.operations().len() {
if self.selected + 1 < self.operations().len() {
self.selected += 1;
}
}