fix: wildcard matching problem (#536)

This commit is contained in:
Skyxim 2023-04-29 01:10:55 +08:00 committed by GitHub
parent 3ba94842cc
commit a4334e1d52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,8 +104,8 @@ func (ss *DomainSet) Has(key string) bool {
goto RESTART goto RESTART
} }
} }
for ; ; nextBmIdx++ { for ; nextBmIdx-nextNodeId < len(ss.labels); nextBmIdx++ {
if nextBmIdx-nextNodeId < len(ss.labels) && ss.labels[nextBmIdx-nextNodeId] == domainStepByte { if ss.labels[nextBmIdx-nextNodeId] == domainStepByte {
bmIdx = nextBmIdx bmIdx = nextBmIdx
nodeId = nextNodeId nodeId = nextNodeId
i = j i = j