diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -303,11 +303,11 @@ CommandCost CmdSetTimetableStart(DoComma int total_duration = v->orders->GetTimetableTotalDuration(); /* Don't let a timetable start more than 15 years into the future or 1 year in the past. */ - if (start_date < 0 || start_date > MAX_DAY) return CMD_ERROR; + if (start_date < 0 || start_date > MAX_DATE) return CMD_ERROR; if (start_date - TimerGameCalendar::date > MAX_TIMETABLE_START_YEARS * DAYS_IN_LEAP_YEAR) return CMD_ERROR; if (TimerGameCalendar::date - start_date > DAYS_IN_LEAP_YEAR) return CMD_ERROR; if (timetable_all && !v->orders->IsCompleteTimetable()) return CommandCost(STR_ERROR_TIMETABLE_INCOMPLETE); - if (timetable_all && start_date + total_duration / DAY_TICKS > MAX_DAY) return CMD_ERROR; + if (timetable_all && start_date + total_duration / DAY_TICKS > MAX_DATE) return CMD_ERROR; if (flags & DC_EXEC) { std::vector vehs;