summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2015-01-03 09:57:46 +0100
committerJeija <norrepli@gmail.com>2015-01-03 10:12:12 +0100
commitdca4706c7ff36abd467fbfcfcbb210b1d11ceba7 (patch)
treeb2818d5108ec75b01dc0fc9477de0d6adc0f9435
parent011543a782152f384a921f7264d87197a12a8497 (diff)
downloadmesecons-dca4706c7ff36abd467fbfcfcbb210b1d11ceba7.tar
mesecons-dca4706c7ff36abd467fbfcfcbb210b1d11ceba7.tar.gz
mesecons-dca4706c7ff36abd467fbfcfcbb210b1d11ceba7.tar.bz2
mesecons-dca4706c7ff36abd467fbfcfcbb210b1d11ceba7.tar.xz
mesecons-dca4706c7ff36abd467fbfcfcbb210b1d11ceba7.zip
Fix #197, doesn't remove the legacy code that triggered it though
-rw-r--r--mesecons/util.lua3
1 files changed, 2 insertions, 1 deletions
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