game: clamp money in case overflowed

This commit is contained in:
jeefo 2023-05-08 23:07:07 +03:00
commit 0842dd7b4e
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED

View file

@ -222,7 +222,7 @@ void MessageDispatcher::netMsgMoney () {
if (m_args.length () < min || !m_bot) {
return;
}
m_bot->m_moneyAmount = m_args[money].long_;
m_bot->m_moneyAmount = cr::clamp (m_args[money].long_, 160000, INT32_MAX);
}
void MessageDispatcher::netMsgStatusIcon () {