Skip to content

Commit

Permalink
fix: subrule can't recursion correctly (#1339)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Jun 22, 2024
1 parent 5028667 commit a9ecc62
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rules/logic/logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package logic

import (
"fmt"
list "github.com/bahlo/generic-list-go"
"regexp"
"strings"

C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/rules/common"

list "github.com/bahlo/generic-list-go"
)

type Logic struct {
Expand Down Expand Up @@ -243,7 +244,7 @@ func matchSubRules(metadata *C.Metadata, name string, subRules map[string][]C.Ru
for _, rule := range subRules[name] {
if m, a := rule.Match(metadata); m {
if rule.RuleType() == C.SubRules {
matchSubRules(metadata, rule.Adapter(), subRules)
return matchSubRules(metadata, rule.Adapter(), subRules)
} else {
return m, a
}
Expand Down

0 comments on commit a9ecc62

Please sign in to comment.