From 41299128e58c0e5e033f55d60eb7068635d1e91a Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 3 Feb 2024 14:35:38 +0000 Subject: [PATCH] Explicitly cast time units when calculating wait time in LoadUnloadVehicle --- src/economy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/economy.cpp b/src/economy.cpp index 2dc190c093..54dd04e838 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -2314,7 +2314,7 @@ static void LoadUnloadVehicle(Vehicle *front) /* We loaded less cargo than possible for all cargo types and it's not full * load and we're not supposed to wait any longer: stop loading. */ if (!anything_unloaded && full_load_amount == 0 && reservation_left == 0 && full_load_cargo_mask == 0 && - (front->current_order_time >= (uint)std::max(front->current_order.GetTimetabledWait() - front->lateness_counter, 0) || + (front->current_order_time >= (uint)std::max((int)front->current_order.GetTimetabledWait() - (int)front->lateness_counter, 0) || may_leave_early())) { SetBit(front->vehicle_flags, VF_STOP_LOADING); if (may_leave_early()) {