(svn r14274) -Fix (r10237): nonexistant order could be selected in the timetable window (causing SIGFPE)
authorsmatz
Mon, 08 Sep 2008 11:06:43 +0000
changeset 10093 687ec810f0a1
parent 10092 63288485ca37
child 10094 c5d924ea981e
(svn r14274) -Fix (r10237): nonexistant order could be selected in the timetable window (causing SIGFPE)
src/timetable_gui.cpp
--- a/src/timetable_gui.cpp	Mon Sep 08 10:08:55 2008 +0000
+++ b/src/timetable_gui.cpp	Mon Sep 08 11:06:43 2008 +0000
@@ -73,7 +73,7 @@
 
 		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()