From eadd6765e139d452ab11a5785b1761901a1932aa Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 20 Oct 2007 14:51:09 +0000 Subject: (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. --- src/economy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/economy.cpp') diff --git a/src/economy.cpp b/src/economy.cpp index 188b803e6..084da0c05 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -95,7 +95,7 @@ Money CalculateCompanyValue(const Player* p) value.AddCost(-p->current_loan); value.AddCost(p->player_money); - return max(value.GetCost(), 1LL); + return max(value.GetCost(), (Money)1); } /** if update is set to true, the economy is updated with this score -- cgit v1.2.3-70-g09d2