summaryrefslogtreecommitdiff
path: root/src/timetable_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-07-20 07:41:43 +0000
committerrubidium <rubidium@openttd.org>2008-07-20 07:41:43 +0000
commita6e314bbba071b8a8b12d13b8c1960903aae77f8 (patch)
tree0176bb93916d02a71d214b03389e84540c98c92c /src/timetable_gui.cpp
parent7c3fc1308771e4f8ea89328b0323a75239515366 (diff)
downloadopenttd-a6e314bbba071b8a8b12d13b8c1960903aae77f8.tar.xz
(svn r13752) -Fix [FS#2130]: correctly restore conditional orders when they are put 'into' backup.
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 f39aed8ed..38ce95e86 100644
--- a/src/timetable_gui.cpp
+++ b/src/timetable_gui.cpp
@@ -86,7 +86,7 @@ struct TimetableWindow : Window {
if (v->owner == _local_player) {
bool disable = true;
if (selected != -1) {
- const Order *order = GetVehicleOrder(v, (selected + 1) / 2);
+ const Order *order = GetVehicleOrder(v, ((selected + 1) / 2) % v->num_orders);
if (selected % 2 == 1) {
disable = order != NULL && order->IsType(OT_CONDITIONAL);
} else {