diff options
author | michi_cc <michi_cc@openttd.org> | 2012-03-20 13:11:20 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2012-03-20 13:11:20 +0000 |
commit | bf3505ca1b1c39ad3d6afbf4160aae6246e7dbf9 (patch) | |
tree | 74846bd82996f5c81bcc587b521b3822880513dc /src | |
parent | 0643a6976467fe85ffae88687477c971e45ec596 (diff) | |
download | openttd-bf3505ca1b1c39ad3d6afbf4160aae6246e7dbf9.tar.xz |
(svn r24053) -Fix (r23947) [FS#5111]: Crash when timetabling a maximum travel speed of 0.
Diffstat (limited to 'src')
-rw-r--r-- | src/timetable_cmd.cpp | 1 |
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: |