diff options
author | truelight <truelight@openttd.org> | 2004-09-11 09:40:19 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-09-11 09:40:19 +0000 |
commit | 4ccd84f94b844388d4fab8413bdf77e5580526fe (patch) | |
tree | d1d00d701e79fadb80b9d6271729f74047eba49d /bridge_gui.c | |
parent | ddeae85be4a0ef6e9e4fd49bd3e0aee0d76831d9 (diff) | |
download | openttd-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 'bridge_gui.c')
-rw-r--r-- | bridge_gui.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bridge_gui.c b/bridge_gui.c index c534dda1b..5106f678c 100644 --- a/bridge_gui.c +++ b/bridge_gui.c @@ -145,7 +145,9 @@ void ShowBuildBridgeWindow(uint start, uint end, byte bridge_type) if (CheckBridge_Stuff(bridge_type, bridge_len)) { // bridge is accepted, add to list // add to terraforming & bulldozing costs the cost of the bridge itself (not computed with DC_QUERY_COST) - _bridge.costs[j] = ret + (((tot_bridge_len * _price.build_bridge) * _bridge_type_price_mod[bridge_type]) >> 8); + _bridge.costs[j] = ret + ((((int64)tot_bridge_len * (int64)_price.build_bridge) * (int64)_bridge_type_price_mod[bridge_type]) >> 8); + if (_bridge.costs[j] < 0) + printf("BLAAT!\n"); _bridge.indexes[j] = bridge_type; j++; } |