forked from mirror/OpenTTD
(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)
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user