From 7572ec427a7b2256b286f6b6f34e53448b7a026a Mon Sep 17 00:00:00 2001 From: D Anzorge Date: Wed, 11 Feb 2015 20:02:23 -0500 Subject: [PATCH] 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 --- code/game/machinery/vending.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 482a36e0d48..f88b7895ae2 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -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