From bf3505ca1b1c39ad3d6afbf4160aae6246e7dbf9 Mon Sep 17 00:00:00 2001 From: michi_cc Date: Tue, 20 Mar 2012 13:11:20 +0000 Subject: (svn r24053) -Fix (r23947) [FS#5111]: Crash when timetabling a maximum travel speed of 0. --- src/timetable_cmd.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index 5be51c37b..166b817eb 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -118,6 +118,7 @@ CommandCost CmdChangeTimetable(TileIndex tile, DoCommandFlag flags, uint32 p1, u case MTF_TRAVEL_SPEED: max_speed = GB(p2, 0, 16); + if (max_speed == 0) max_speed = UINT16_MAX; // Disable speed limit. break; default: -- cgit v1.2.3-70-g09d2