From 8716fc73506869a7b1b435819428470d8eafd0fa Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 1 Jul 2013 00:01:57 +0300 Subject: [PATCH] Fix a comparison that let an off-by-one error in --- source/list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/list.cpp b/source/list.cpp index fbb711e..7227f0c 100644 --- a/source/list.cpp +++ b/source/list.cpp @@ -121,7 +121,7 @@ void List::set_view_all() void List::set_selected_index(int i) { - if(i>static_cast(data->size())) + if(i>=static_cast(data->size())) throw out_of_range("List::set_selected_index"); if(sel_index>=0) -- 2.43.0