1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-01 10:59:12 +00:00

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

This commit is contained in:
Tyler Trahan
2023-04-12 14:52:37 -04:00
committed by GitHub
parent a0d8545f6c
commit 97cfd40649

View File

@@ -771,7 +771,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);
}
/**