mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 17:19:09 +00:00
Fix #14295, 0455627d16
: v->cur_implicit_order_index is never INVALID_VEH_ORDER_ID
This commit is contained in:
@@ -366,8 +366,8 @@ StationIDStack OrderList::GetNextStoppingStation(const Vehicle *v, VehicleOrderI
|
||||
VehicleOrderID next = first;
|
||||
if (first == INVALID_VEH_ORDER_ID) {
|
||||
next = v->cur_implicit_order_index;
|
||||
if (next == INVALID_VEH_ORDER_ID) {
|
||||
next = v->orders->GetFirstOrder();
|
||||
if (next >= this->GetNumOrders()) {
|
||||
next = this->GetFirstOrder();
|
||||
if (next == INVALID_VEH_ORDER_ID) return StationID::Invalid().base();
|
||||
} else {
|
||||
/* GetNext never returns INVALID_VEH_ORDER_ID if there is a valid station in the list.
|
||||
|
Reference in New Issue
Block a user