From 7160fb2a4b63100ffd0c3feaac5588539bdcfbc2 Mon Sep 17 00:00:00 2001 From: gVisor bot 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