From 223e5429ef768fd65ff4402acdc77610e87acfca Mon Sep 17 00:00:00 2001 From: oranges Date: Sat, 4 May 2019 05:20:15 +1200 Subject: [PATCH] clamp the biogen amount to within the limits allowed by the UI (#43792) --- code/modules/hydroponics/biogenerator.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index d8ca934c467..5e837b4d349 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -309,6 +309,8 @@ else if(href_list["create"]) var/amount = (text2num(href_list["amount"])) + //Can't be outside these (if you change this keep a sane limit) + amount = CLAMP(amount, 1, 10) var/datum/design/D = locate(href_list["create"]) create_product(D, amount) updateUsrDialog()