diff options
author | smatz <smatz@openttd.org> | 2008-09-08 11:06:43 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-09-08 11:06:43 +0000 |
commit | db7c2b97f87fe5f07ef298a5d74b765a9a3fc84f (patch) | |
tree | 662ae3326d9a1a1347a9a9dd2dcc4001d4f86361 | |
parent | 250e4476bab999ce92f54e70167665042dccbb13 (diff) | |
download | openttd-db7c2b97f87fe5f07ef298a5d74b765a9a3fc84f.tar.xz |
(svn r14274) -Fix (r10237): nonexistant order could be selected in the timetable window (causing SIGFPE)
-rw-r--r-- | src/timetable_gui.cpp | 2 |
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() |