From dc989e6df2a1452745be615f30163eeb5782c947 Mon Sep 17 00:00:00 2001 From: tristan Date: Tue, 12 Mar 2024 17:27:46 +0100 Subject: [PATCH] fix: classes with modifiers and postfix causing string overflow --- pkg/twmerge/modifier-utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/twmerge/modifier-utils.go b/pkg/twmerge/modifier-utils.go index 884799b..e107866 100644 --- a/pkg/twmerge/modifier-utils.go +++ b/pkg/twmerge/modifier-utils.go @@ -46,7 +46,7 @@ func MakeSplitModifiers(conf *TwMergeConfig) SplitModifiersFn { baseClass = baseClassWithImportant } - // fix case where there is modifier & maybePostfix which causes maybePostfix to be beyond size of baseClass + // fix case where there is modifier & maybePostfix which causes maybePostfix to be beyond size of baseClass! if maybePostfixModPosition != -1 && maybePostfixModPosition > modifierStart { maybePostfixModPosition -= modifierStart }