From 9527bad3a7fe4098ff2ebe2173e2d7b14d1aaaa7 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 29 Jul 2012 16:48:00 +0000 Subject: (svn r24446) -Add [FS#5199]: Store more consist properties in order backups. --- src/order_backup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/order_backup.cpp') diff --git a/src/order_backup.cpp b/src/order_backup.cpp index e6effaf0f..100348f8a 100644 --- a/src/order_backup.cpp +++ b/src/order_backup.cpp @@ -86,7 +86,7 @@ void OrderBackup::DoRestore(Vehicle *v) /* Make sure orders are in range */ v->UpdateRealOrderIndex(); - v->cur_implicit_order_index = v->cur_real_order_index; + if (v->cur_implicit_order_index >= v->GetNumOrders()) v->cur_implicit_order_index = v->cur_real_order_index; /* Restore vehicle group */ DoCommand(0, this->group, v->index, DC_EXEC, CMD_ADD_VEHICLE_GROUP); -- cgit v1.2.3-54-g00ecf