mirror of
https://github.com/bartbes/inifile.git
synced 2024-11-15 23:54:23 +00:00
Prevent error when data is outside of a section
Which is now picked up as a parse error and returned.
This commit is contained in:
parent
149af030cd
commit
274bb1e0ce
@ -90,7 +90,7 @@ function inifile.parse(name, backend)
|
|||||||
if tonumber(value) then value = tonumber(value) end
|
if tonumber(value) then value = tonumber(value) end
|
||||||
if value == "true" then value = true end
|
if value == "true" then value = true end
|
||||||
if value == "false" then value = false 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
|
t[section][key] = value
|
||||||
table.insert(cursectionorder, key)
|
table.insert(cursectionorder, key)
|
||||||
validLine = true
|
validLine = true
|
||||||
|
Loading…
Reference in New Issue
Block a user