Skip to content

Commit 411e18b

Browse files
committed
bugfix #102: Improve checking if matches compete
1 parent 7086d68 commit 411e18b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

decompile.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,8 +1335,18 @@ func matchSplitAction(splitActions *[]actionValue, parameters map[string]any, id
13351335

13361336
// competingMatches determines if the matches for this identifier have more values than 1 matching this action.
13371337
func competingMatches(matches []actionMatch) bool {
1338+
var hasCompetingValues bool
13381339
for _, match := range matches {
1339-
if match.params > 1 || match.values > 0 {
1340+
if match.values > 1 {
1341+
hasCompetingValues = true
1342+
break
1343+
}
1344+
}
1345+
if hasCompetingValues {
1346+
return true
1347+
}
1348+
for _, match := range matches {
1349+
if match.params > 1 {
13401350
return true
13411351
}
13421352
}

0 commit comments

Comments
 (0)