From fc234505c7459e817581029a2f780e22eda266db Mon Sep 17 00:00:00 2001 From: Drulikar Date: Sat, 3 Feb 2024 08:39:20 -0800 Subject: [PATCH] More 515 feature fixes --- code/modules/tgui/tgui_number_input.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/tgui/tgui_number_input.dm b/code/modules/tgui/tgui_number_input.dm index aa189b1d2039..4c06b5333b6d 100644 --- a/code/modules/tgui/tgui_number_input.dm +++ b/code/modules/tgui/tgui_number_input.dm @@ -158,11 +158,13 @@ return switch(action) if("submit") - if(!isnum(params["entry"])) - CRASH("A non number was input into tgui input number by [usr]") var/choice = params["entry"] + if(!isnum(choice)) + CRASH("A non number was input into tgui input number by [usr]") + if(choice != choice) //isnan + CRASH("A NaN was input into tgui input number by [usr]") if(integer_only) - choice = round(params["entry"]) + choice = round(choice) if(choice > max_value) CRASH("A number greater than the max value was input into tgui input number by [usr]") if(choice < min_value)