Skip to content

Commit

Permalink
Fixed default value in cash splitting being out of bounds for tgui_in…
Browse files Browse the repository at this point in the history
…put_number (#4672)

`[2023-10-13 22:54:01.748] runtime error: Default value is greater than
max value. (How many dollars do you want to take? (0 to 2), Take Money)`

obviously a default of 20 can be out of bounds for a maximum of an
arbitary positive value

don't mock the poor...
  • Loading branch information
fira committed Oct 15, 2023
1 parent 7a8a281 commit 06fb75f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/economy/cash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
/obj/item/spacecash/bundle/attack_self(mob/user)
..()
var/oldloc = loc
var/amount = tgui_input_number(user, "How many dollars do you want to take? (0 to [src.worth])", "Take Money", 20, src.worth, 0)
var/amount = tgui_input_number(user, "How many dollars do you want to take? (0 to [src.worth])", "Take Money", 0, src.worth, 0)
amount = round(Clamp(amount, 0, src.worth))
if(amount == 0)
return
Expand Down

0 comments on commit 06fb75f

Please sign in to comment.