From a9ecc627e6376bcb75d2dfc9ca20008e8c794f7b Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Sat, 22 Jun 2024 13:10:09 +0800 Subject: [PATCH] fix: subrule can't recursion correctly (#1339) --- rules/logic/logic.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rules/logic/logic.go b/rules/logic/logic.go index 397a16b722..8c79cab537 100644 --- a/rules/logic/logic.go +++ b/rules/logic/logic.go @@ -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 { @@ -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 }