Fixed CFG file loading with Windows encoding (fixes #80)

This commit is contained in:
Timo Smit 2017-03-13 09:02:26 +01:00
parent cf0988d442
commit e9d17e8572
1 changed files with 1 additions and 1 deletions

View File

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