Add an extra check to vending's Topic()

Topic() now checks if it really can vend items with current category config,
in case the request was malformed/rewritten
This commit is contained in:
D Anzorge
2015-02-11 20:02:23 -05:00
parent cee2d2502a
commit 7572ec427a
+5 -1
View File
@@ -488,7 +488,11 @@
var/key = text2num(href_list["vend"])
var/datum/data/vending_product/R = product_records[key]
// This should not happen unless the request from NanoUI was bad
if(!(R.category & src.categories))
return
if(R.price <= 0)
src.vend(R, usr)
else