From 6b2a341be5b42f12af17d0b14bd8e039dca13577 Mon Sep 17 00:00:00 2001 From: tommy aka doge <59783653+dowoge@users.noreply.github.com> Date: Sun, 11 Sep 2022 23:00:12 -0400 Subject: [PATCH] special case for certain maps (lua string pattern issue) --- src/modules/commands/maps_init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/commands/maps_init.lua b/src/modules/commands/maps_init.lua index 2bd6c89..a882134 100644 --- a/src/modules/commands/maps_init.lua +++ b/src/modules/commands/maps_init.lua @@ -49,8 +49,7 @@ for _, game in next, API.GAMES do if type(k)=='string' then for i = 1, self.count do local v = self[i] - - if type(v) == 'table' and v.DisplayName:lower():find(tostring(k):lower()) then + if type(v) == 'table' and v.DisplayName:lower():find(tostring(k:gsub('%%', '%%%%'):gsub('^%^', '%%^'):gsub('%$$', '%%$'):gsub('%(', '%%('):gsub('%)', '%%)'):gsub('%.', '%%.'):gsub('%[', '%%['):gsub('%]', '%%]'):gsub('%*', '%%*'):gsub('%+', '%%+'):gsub('%-', '%%-'):gsub('%?', '%%?')):lower()) then return v end end