diff options
Diffstat (limited to 'sigencore/Player.cpp')
| -rw-r--r-- | sigencore/Player.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sigencore/Player.cpp b/sigencore/Player.cpp index 1f9e6057..25a819b5 100644 --- a/sigencore/Player.cpp +++ b/sigencore/Player.cpp @@ -144,7 +144,7 @@ bool Sigencore::Player::giveMoney(const int amount, const bool allOrNothing) valueOfType("money-minimum", &playerMin); valueOfType("money-maximum", &playerMax); const int newUnbounded = m_money + amount; - const int newAmount = qMin(qMax(0, playerMin), qMax(playerMax, newAmount)); + const int newAmount = qBound(qMax(0, playerMin), newUnbounded, qMin(playerMax, INT_MAX)); if (allOrNothing || (newUnbounded == newAmount)) { m_money = newAmount; |
