aboutsummaryrefslogtreecommitdiff
path: root/mkelf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'mkelf.lua')
-rw-r--r--mkelf.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/mkelf.lua b/mkelf.lua
index 3ad7dba..b7c693a 100644
--- a/mkelf.lua
+++ b/mkelf.lua
@@ -43,6 +43,9 @@ local function loadconfig(fn)
error("segments must be a table", 2)
end
for _, segment in ipairs(t) do
+ if type(segment) ~= "table" then
+ error("segment must be a table", 2)
+ end
segment = setmetatable(segment, segment_mt)
segment:normalize()
segment:validate()
@@ -54,6 +57,9 @@ local function loadconfig(fn)
error("sections must be a table", 2)
end
for _, section in ipairs(t) do
+ if type(section) ~= "table" then
+ error("section must be a table", 2)
+ end
section = setmetatable(section, section_mt)
section:normalize()
section:validate()