Skip to content

Commit

Permalink
Fixed CFG file loading with Windows encoding (fixes #80)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timo Smit committed Mar 13, 2017
1 parent cf0988d commit e9d17e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion luamods/wolfadmin/util/files.lua
Expand Up @@ -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]+"
local blockExpr = "%[("..idExpr..")%][\r\n]+(.-[\r\n]+)[\r\n]+[\r\n]+"
local attrExpr = "([a-z0-9_]+) += +(.-)[\r\n]+"

for id, values in string.gmatch(fileString, blockExpr) do
Expand Down

0 comments on commit e9d17e8

Please sign in to comment.