From db7c2b97f87fe5f07ef298a5d74b765a9a3fc84f Mon Sep 17 00:00:00 2001 From: smatz Date: Mon, 8 Sep 2008 11:06:43 +0000 Subject: (svn r14274) -Fix (r10237): nonexistant order could be selected in the timetable window (causing SIGFPE) --- src/timetable_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/timetable_gui.cpp') diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 8d428cc2d..e227b2e6c 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -73,7 +73,7 @@ struct TimetableWindow : Window { sel += this->vscroll.pos; - return (sel <= v->num_orders * 2 && sel >= 0) ? sel : INVALID_ORDER; + return (sel < v->num_orders * 2 && sel >= 0) ? sel : INVALID_ORDER; } void OnPaint() -- cgit v1.2.3-54-g00ecf