1
0
Fork 0

Fix #14295, 0455627d16: v->cur_implicit_order_index is never INVALID_VEH_ORDER_ID (#14296)

pull/14297/head
Loïc Guilloux 2025-05-24 15:53:51 +02:00 committed by GitHub
parent c366e6a48e
commit fea120a710
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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.