From: Mikko Rasa Date: Sun, 30 Jun 2013 21:01:57 +0000 (+0300) Subject: Fix a comparison that let an off-by-one error in X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=8716fc73506869a7b1b435819428470d8eafd0fa;p=libs%2Fgltk.git Fix a comparison that let an off-by-one error in --- 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)