summaryrefslogtreecommitdiff
path: root/src/timetable_gui.cpp
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
commitdb7c2b97f87fe5f07ef298a5d74b765a9a3fc84f (patch)
tree662ae3326d9a1a1347a9a9dd2dcc4001d4f86361 /src/timetable_gui.cpp
parent250e4476bab999ce92f54e70167665042dccbb13 (diff)
downloadopenttd-db7c2b97f87fe5f07ef298a5d74b765a9a3fc84f.tar.xz
(svn r14274) -Fix (r10237): nonexistant order could be selected in the timetable window (causing SIGFPE)
Diffstat (limited to 'src/timetable_gui.cpp')
-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()