diff --git a/trie.go b/trie.go index 2743014..7fe8368 100644 --- a/trie.go +++ b/trie.go @@ -130,6 +130,9 @@ func (p *prefixTrie) contains(number rnet.NetworkNumber) (bool, error) { if p.hasEntry() { return true, nil } + if p.targetBitPosition() < 0 { + return false, nil + } bit, err := p.targetBitFromIP(number) if err != nil { return false, err