From 06fb75f5129dfe5654c7d3cf2cda5da4dd9641e3 Mon Sep 17 00:00:00 2001 From: fira Date: Sun, 15 Oct 2023 18:46:15 +0200 Subject: [PATCH] Fixed default value in cash splitting being out of bounds for tgui_input_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... --- code/modules/economy/cash.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm index bba80f85762a..ad09eaf3fa09 100644 --- a/code/modules/economy/cash.dm +++ b/code/modules/economy/cash.dm @@ -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