From 5ab30967165519ec9958b813d3b5b00fb4ee79db 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') 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-70-g09d2