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