Fixes 2 infinite credits exploits. (#94523)

## About The Pull Request

What it says in the title. 2 href exploits.

## Changelog
🆑
fix: Fixed 2 infinite credit exploits.
/🆑
This commit is contained in:
leaKsi
2025-12-18 14:15:01 +00:00
committed by GitHub
parent 0858f83b85
commit f5e97b5e52
2 changed files with 4 additions and 2 deletions
@@ -267,6 +267,8 @@ GLOBAL_LIST_EMPTY_TYPED(active_bets, /datum/active_bet)
return
//taking money out
if(text2num(existing_bets[2]) > money_betting)
if(money_betting < 0)
return
var/money_taking_out = text2num(existing_bets[2]) - money_betting
total_amount_bet -= money_taking_out
better.bank_card_talk("Refunded [money_taking_out][MONEY_SYMBOL] for taking money out of your bet on [name].")
@@ -274,7 +276,7 @@ GLOBAL_LIST_EMPTY_TYPED(active_bets, /datum/active_bet)
existing_bets[2] = "[money_betting]"
return
if(!better.adjust_money(-money_betting, "Gambling on [name]"))
if(money_betting <= 0 || !better.adjust_money(-money_betting, "Gambling on [name]"))
return
total_amount_bet += money_betting
options[option_betting] += list(list(better, "[money_betting]"))