summaryrefslogtreecommitdiff
path: root/economy.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 /economy.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 'economy.c')
-rw-r--r--economy.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/economy.c b/economy.c
index 02f196cac..a9e18e0a7 100644
--- a/economy.c
+++ b/economy.c
@@ -41,9 +41,9 @@ void UpdatePlayerHouse(Player *p, uint score)
MarkTileDirtyByTile(tile + TILE_XY(1,1));
}
-uint32 CalculateCompanyValue(Player *p) {
+int64 CalculateCompanyValue(Player *p) {
byte owner = p->index;
- uint32 value;
+ int64 value;
{
Station *st;
@@ -340,7 +340,7 @@ extern void DeletePlayerWindows(int pi);
static void PlayersCheckBankrupt(Player *p)
{
int owner;
- uint32 val;
+ int64 val;
if (p->player_money >= 0) {
p->quarters_of_bankrupcy = 0;
@@ -1313,7 +1313,7 @@ static void DoAcquireCompany(Player *p)
{
Player *owner;
int i,pi;
- int32 value;
+ int64 value;
SET_DPARAM16(0, p->name_1);
SET_DPARAM32(1, p->name_2);
@@ -1347,7 +1347,7 @@ static void DoAcquireCompany(Player *p)
int32 CmdBuyShareInCompany(int x, int y, uint32 flags, uint32 p1, uint32 p2)
{
Player *p;
- int32 cost;
+ int64 cost;
byte *b;
int i;
@@ -1375,7 +1375,7 @@ int32 CmdBuyShareInCompany(int x, int y, uint32 flags, uint32 p1, uint32 p2)
int32 CmdSellShareInCompany(int x, int y, uint32 flags, uint32 p1, uint32 p2)
{
Player *p;
- int32 cost;
+ int64 cost;
byte *b;
SET_EXPENSES_TYPE(EXPENSES_OTHER);