summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-10-20 14:51:09 +0000
committerrubidium <rubidium@openttd.org>2007-10-20 14:51:09 +0000
commiteadd6765e139d452ab11a5785b1761901a1932aa (patch)
tree28fbe813d418b83e119aa615200f98b20ba520c8 /src/economy.cpp
parent3a361422fa7fbddf7cd3480e216aae214e793743 (diff)
downloadopenttd-eadd6765e139d452ab11a5785b1761901a1932aa.tar.xz
(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.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp2
1 files changed, 1 insertions, 1 deletions
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