From 18ddbdac840cf5fb9e42e82944b9d26bd2b56a12 Mon Sep 17 00:00:00 2001 From: Fridge Date: Tue, 20 Jun 2017 20:51:08 -0300 Subject: [PATCH] Fix for '-' characters in the prefix string when using FilterPrefix on groups with '-' in the name This should replace '-' characters in the search pattern with %- (the escaped version). Thedouble %% is necessary to get the escape sequence through. --- Moose Development/Moose/Core/Set.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Core/Set.lua b/Moose Development/Moose/Core/Set.lua index 6844d5e62..d171e104d 100644 --- a/Moose Development/Moose/Core/Set.lua +++ b/Moose Development/Moose/Core/Set.lua @@ -1193,7 +1193,7 @@ function SET_GROUP:IsIncludeObject( MooseGroup ) local MooseGroupPrefix = false for GroupPrefixId, GroupPrefix in pairs( self.Filter.GroupPrefixes ) do self:T3( { "Prefix:", string.find( MooseGroup:GetName(), GroupPrefix, 1 ), GroupPrefix } ) - if string.find( MooseGroup:GetName(), GroupPrefix, 1 ) then + if string.find( MooseGroup:GetName(), GroupPrefix:gsub ("-", "%%-"), 1 ) then MooseGroupPrefix = true end end