Skip to content

Commit

Permalink
fix: classes with modifiers and postfix causing string overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Oudwins committed Mar 12, 2024
1 parent 1976dd0 commit dc989e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/twmerge/modifier-utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit dc989e6

Please sign in to comment.