summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index dd51e0911..fde538feb 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -660,8 +660,8 @@ static void PlayersGenStatistics()
static void AddSingleInflation(Money *value, uint16 *frac, int32 amt)
{
/* Is it safe to add inflation ? */
- if ((MAX_UVALUE(Money) / 2 / amt) > (*value + *frac + 1)) {
- *value = MAX_UVALUE(Money);
+ if ((INT64_MAX / amt) < (*value + 1)) {
+ *value = INT64_MAX / amt;
*frac = 0;
} else {
int64 tmp = (int64)*value * amt + *frac;