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/road_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/road_cmd.cpp')
-rw-r--r-- | src/road_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 6d3669925..1b404a97f 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -366,7 +366,7 @@ static CommandCost CheckRoadSlope(Slope tileh, RoadBits* pieces, RoadBits existi /* foundation is used. Whole tile is leveled up */ if ((~_valid_tileh_slopes_road[1][tileh] & road_bits) == ROAD_NONE) { - return CommandCost(existing != ROAD_NONE ? 0 : _price.terraform); + return CommandCost(existing != ROAD_NONE ? (Money)0 : _price.terraform); } /* Force straight roads. */ |