diff --git a/date.c b/date.c index 8401baa31c..631e88ba3c 100644 --- a/date.c +++ b/date.c @@ -196,7 +196,7 @@ static const Month _autosave_months[] = { */ static void RunVehicleDayProc(uint daytick) { - uint total = GetVehiclePoolSize(); + uint total = GetMaxVehicleIndex() + 1; uint i; for (i = daytick; i < total; i += DAY_TICKS) {