fix: wildcard matching problem

This commit is contained in:
Skyxim 2023-04-28 16:55:35 +00:00
parent 898f10ca96
commit a7233f6036

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