patch IniFile's Lua implementation to have # comment support. Could potentially be breaking, but I'm unaware of any INI files that try to use tags that start with #.
This commit is contained in:
@@ -65,6 +65,8 @@ IniFile =
|
||||
while not file:AtEOF() do
|
||||
local str = file:GetLine()
|
||||
|
||||
--ignore comments.
|
||||
if not str:find("^%s*#") then
|
||||
-- is this a section?
|
||||
local _, _, sec = str:find( "%[(.+)%]" )
|
||||
|
||||
@@ -80,6 +82,7 @@ IniFile =
|
||||
if k and v then current[k] = v end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
file:Close()
|
||||
file:destroy()
|
||||
|
||||
Reference in New Issue
Block a user