From f3a9449714169fdd1fe1e828eb0e176d983cb16d Mon Sep 17 00:00:00 2001 From: Sergey Avdeev Date: Tue, 8 Jun 2021 14:51:57 +0300 Subject: [PATCH 1/2] Fixed windows line break --- LIP.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LIP.lua b/LIP.lua index aecdb14..bd29953 100644 --- a/LIP.lua +++ b/LIP.lua @@ -34,7 +34,7 @@ function LIP.load(fileName) local data = {}; local section; for line in file:lines() do - local tempSection = line:match('^%[([^%[%]]+)%]$'); + local tempSection = line:match('^%[([^%[%]]+)%][\r]?$'); if(tempSection)then section = tonumber(tempSection) and tonumber(tempSection) or tempSection; data[section] = data[section] or {}; @@ -77,4 +77,4 @@ function LIP.save(fileName, data) file:close(); end -return LIP; \ No newline at end of file +return LIP; From c69c04b371d80bb93d7d7a4e4193654479db7d38 Mon Sep 17 00:00:00 2001 From: Sergey Avdeev Date: Tue, 8 Jun 2021 14:56:59 +0300 Subject: [PATCH 2/2] Update LIP.lua --- LIP.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LIP.lua b/LIP.lua index bd29953..2d23e65 100644 --- a/LIP.lua +++ b/LIP.lua @@ -39,7 +39,7 @@ function LIP.load(fileName) section = tonumber(tempSection) and tonumber(tempSection) or tempSection; data[section] = data[section] or {}; end - local param, value = line:match('^([%w|_]+)%s-=%s-(.+)$'); + local param, value = line:match('^([%w|_]+)%s-=%s-(.+)[\r]?$'); if(param and value ~= nil)then if(tonumber(value))then value = tonumber(value);