Fixed CFG loading with Unix file endings (refs #80)

This commit is contained in:
Timo Smit 2017-03-13 09:16:36 +01:00
parent e9d17e8572
commit db6a378032

View file

@ -52,7 +52,7 @@ function files.loadFromCFG(fileName, idExpr)
if not fileString then return 0, {} end
local blockExpr = "%[("..idExpr..")%][\r\n]+(.-[\r\n]+)[\r\n]+[\r\n]+"
local blockExpr = "%[("..idExpr..")%][\r\n]+([^[]+)[\r\n]+"
local attrExpr = "([a-z0-9_]+) += +(.-)[\r\n]+"
for id, values in string.gmatch(fileString, blockExpr) do