Merge pull request #6715 from Menshin/stacks_href_exploit_fix

Prevent stacks multiplier href exploit
This commit is contained in:
Zuhayr
2014-10-15 03:22:57 +10:30

View File

@@ -117,7 +117,8 @@
recipes_list = srl.recipes
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
if (multiplier <= 0) //href exploit protection
return
if (src.amount < R.req_amount*multiplier)
if (R.req_amount*multiplier>1)
usr << "\red You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!"