summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-03-20 13:11:20 +0000
committermichi_cc <michi_cc@openttd.org>2012-03-20 13:11:20 +0000
commitbf3505ca1b1c39ad3d6afbf4160aae6246e7dbf9 (patch)
tree74846bd82996f5c81bcc587b521b3822880513dc
parent0643a6976467fe85ffae88687477c971e45ec596 (diff)
downloadopenttd-bf3505ca1b1c39ad3d6afbf4160aae6246e7dbf9.tar.xz
(svn r24053) -Fix (r23947) [FS#5111]: Crash when timetabling a maximum travel speed of 0.
-rw-r--r--src/timetable_cmd.cpp1
1 files changed, 1 insertions, 0 deletions
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: