summaryrefslogtreecommitdiff
path: root/tunnelbridge_cmd.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-09-11 09:40:19 +0000
committertruelight <truelight@openttd.org>2004-09-11 09:40:19 +0000
commit4ccd84f94b844388d4fab8413bdf77e5580526fe (patch)
treed1d00d701e79fadb80b9d6271729f74047eba49d /tunnelbridge_cmd.c
parentddeae85be4a0ef6e9e4fd49bd3e0aee0d76831d9 (diff)
downloadopenttd-4ccd84f94b844388d4fab8413bdf77e5580526fe.tar.xz
(svn r201) -Fix: [1025836] Company values bigger dan int32 were put to negative
-Fix: [1025836] Long bridges had negative value -Fix: Typo in endian_check.c (Zr40)
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r--tunnelbridge_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 0e8139c75..9866650b2 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -383,7 +383,7 @@ not_valid_below:;
if (_current_player < MAX_PLAYERS && !(_is_ai_player && !_patches.ainew_active))
bridge_len = CalcBridgeLenCostFactor(bridge_len);
- cost += ((bridge_len * _price.build_bridge) * _bridge_type_price_mod[bridge_type]) >> 8;
+ cost += (((int64)bridge_len * (int64)_price.build_bridge) * (int64)_bridge_type_price_mod[bridge_type]) >> 8;
}
return cost;