1
0
Fork 0

Fix #10630: Don't allow shifting service date earlier than 0 (#10643)

pull/10922/head
Tyler Trahan 2023-04-12 14:52:37 -04:00 committed by Loïc Guilloux
parent 78512af02e
commit da20e0f6e6
1 changed files with 1 additions and 1 deletions

View File

@ -770,7 +770,7 @@ uint32 Vehicle::GetGRFID() const
*/
void Vehicle::ShiftDates(int interval)
{
this->date_of_last_service += interval;
this->date_of_last_service = std::max(this->date_of_last_service + interval, 0);
}
/**