From dca4706c7ff36abd467fbfcfcbb210b1d11ceba7 Mon Sep 17 00:00:00 2001 From: Jeija Date: Sat, 3 Jan 2015 09:57:46 +0100 Subject: [PATCH] Fix #197, doesn't remove the legacy code that triggered it though --- mesecons/util.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesecons/util.lua b/mesecons/util.lua index 4429a5a..ab2f32c 100644 --- a/mesecons/util.lua +++ b/mesecons/util.lua @@ -59,7 +59,6 @@ end function mesecon.rule2metaindex(findrule, allrules) --get the metarule the rule is in, or allrules - if allrules[1].x then return nil end @@ -78,6 +77,8 @@ function mesecon.rule2metaindex(findrule, allrules) end function mesecon.rule2meta(findrule, allrules) + if #allrules == 0 then return {} end + local index = mesecon.rule2metaindex(findrule, allrules) if index == nil then if allrules[1].x then