diff options
author | rubidium <rubidium@openttd.org> | 2007-10-20 14:51:09 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-20 14:51:09 +0000 |
commit | 8212088c03c0a0af451f734391699e5dab8d8608 (patch) | |
tree | 28fbe813d418b83e119aa615200f98b20ba520c8 /src/rail_cmd.cpp | |
parent | 54369cba0f9d1cda2d40752eb337d153b3b6775f (diff) | |
download | openttd-8212088c03c0a0af451f734391699e5dab8d8608.tar.xz |
(svn r11312) -Codechange: implement a overflow safe integer and use that for money and don't misuses CommandCost to have a overflow safe integer. Based on a patch by Noldo.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 973737db1..00f397453 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -267,7 +267,7 @@ static CommandCost CheckRailSlope(Slope tileh, TrackBits rail_bits, TrackBits ex ) return_cmd_error(STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION); Foundation f_old = GetRailFoundation(tileh, existing); - return CommandCost(f_new != f_old ? _price.terraform : 0); + return CommandCost(f_new != f_old ? _price.terraform : (Money)0); } /* Validate functions for rail building */ |