From 274bb1e0ce62a8743e83cfdfe1e313c292f91bdf Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Mon, 26 Jul 2021 13:59:59 +0200 Subject: [PATCH] Prevent error when data is outside of a section Which is now picked up as a parse error and returned. --- inifile.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inifile.lua b/inifile.lua index e6949ba..4dc31fa 100644 --- a/inifile.lua +++ b/inifile.lua @@ -90,7 +90,7 @@ function inifile.parse(name, backend) if tonumber(value) then value = tonumber(value) end if value == "true" then value = true end if value == "false" then value = false end - if key and value ~= nil then + if key and value ~= nil and section ~= nil then t[section][key] = value table.insert(cursectionorder, key) validLine = true