summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-09-08 11:06:43 +0000
committersmatz <smatz@openttd.org>2008-09-08 11:06:43 +0000
commit5ab30967165519ec9958b813d3b5b00fb4ee79db (patch)
tree662ae3326d9a1a1347a9a9dd2dcc4001d4f86361
parentf75ee75661a110da4f2e5a0cd4838a68bde7fc8a (diff)
downloadopenttd-5ab30967165519ec9958b813d3b5b00fb4ee79db.tar.xz
(svn r14274) -Fix (r10237): nonexistant order could be selected in the timetable window (causing SIGFPE)
-rw-r--r--src/timetable_gui.cpp2
1 files changed, 1 insertions, 1 deletions
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()