Skip to content

Commit

Permalink
Fix #12818: during Hostile Takeover, profit was calculated wrongly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBrain committed Jun 26, 2024
1 parent 209b032 commit 21813fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/economy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Money CalculateHostileTakeoverValue(const Company *c)
}

for (int quarter = 0; quarter < 4; quarter++) {
value += std::max<Money>(c->old_economy[quarter].income - c->old_economy[quarter].expenses, 0) * 2;
value += std::max<Money>(c->old_economy[quarter].income + c->old_economy[quarter].expenses, 0) * 2;
}

return std::max<Money>(value, 1);
Expand Down

0 comments on commit 21813fb

Please sign in to comment.