From 1b12bd32b77f27907ea408dc693c7aae86435ccd Mon Sep 17 00:00:00 2001 From: Renan Guilherme Date: Fri, 16 Jul 2021 05:31:27 -0400 Subject: [PATCH] _fallback: INI sections must start with brackets (#2127) Previously, IniFile.ReadFile created sections by checking for brackets anywhere in the line, causing issues if a value had brackets. This commit changes the section matching regex, so that only lines that begin with a bracket can become sections. --- Themes/_fallback/Scripts/01 IniFile.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Themes/_fallback/Scripts/01 IniFile.lua b/Themes/_fallback/Scripts/01 IniFile.lua index e99c918e46..c61b0cbabe 100644 --- a/Themes/_fallback/Scripts/01 IniFile.lua +++ b/Themes/_fallback/Scripts/01 IniFile.lua @@ -80,7 +80,7 @@ IniFile = --ignore comments. if not str:find("^%s*#") then -- is this a section? - local sec = str:match( "%[(.+)%]" ) + local sec = str:match( "^%[(.+)%]" ) -- if so, set focus there; otherwise, try to -- read a key/value pair (ignore blank lines)