# HG changeset patch # User Tyler Trahan # Date 2023-04-12 18:52:37 # Node ID 65ea8be28e55cb237d87784828724999b9a878af # Parent 9f21e27136e89cd35edc884e12ce5db1f73fcb6e Fix #10630: Don't allow shifting service date earlier than 0 (#10643) diff --git a/src/vehicle.cpp b/src/vehicle.cpp --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -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); } /**