From a7233f603620d0e31ef3651d8eb5c3501d892e57 Mon Sep 17 00:00:00 2001 From: Skyxim Date: Fri, 28 Apr 2023 16:55:35 +0000 Subject: [PATCH] fix: wildcard matching problem --- component/trie/domain_set.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/component/trie/domain_set.go b/component/trie/domain_set.go index be793ad3..41ca2161 100644 --- a/component/trie/domain_set.go +++ b/component/trie/domain_set.go @@ -104,8 +104,8 @@ func (ss *DomainSet) Has(key string) bool { goto RESTART } } - for ; ; nextBmIdx++ { - if nextBmIdx-nextNodeId < len(ss.labels) && ss.labels[nextBmIdx-nextNodeId] == domainStepByte { + for ; nextBmIdx-nextNodeId < len(ss.labels); nextBmIdx++ { + if ss.labels[nextBmIdx-nextNodeId] == domainStepByte { bmIdx = nextBmIdx nodeId = nextNodeId i = j