mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-10 23:54:14 +01:00
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:
@@ -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]"))
|
||||
|
||||
Reference in New Issue
Block a user