diff options
Diffstat (limited to 'src/order_backup.cpp')
-rw-r--r-- | src/order_backup.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |