diff options
Diffstat (limited to 'src/timetable_cmd.cpp')
-rw-r--r-- | src/timetable_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index c003acbee..9cc8ddb0c 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -279,7 +279,7 @@ void UpdateVehicleTimetable(Vehicle *v, bool travelling) /* Round the time taken up to the nearest day, as this will avoid * confusion for people who are timetabling in days, and can be * adjusted later by people who aren't. */ - time_taken = (((time_taken - 1) / DAY_TICKS) + 1) * DAY_TICKS; + time_taken = CeilDiv(time_taken, DAY_TICKS) * DAY_TICKS; ChangeTimetable(v, v->cur_order_index, time_taken, travelling); } |