core: fix func calcBloomIndexes indexing past 2047

This commit is contained in:
Armani Ferrante 2017-11-30 14:54:28 -08:00 committed by Armani Ferrante
parent 73067fd24f
commit 753d979368

View file

@ -40,7 +40,7 @@ func calcBloomIndexes(b []byte) bloomIndexes {
var idxs bloomIndexes
for i := 0; i < len(idxs); i++ {
idxs[i] = (uint(b[2*i])<<8)&2047 + uint(b[2*i+1])
idxs[i] = ((uint(b[2*i]) << 8) + uint(b[2*i+1])) & 2047
}
return idxs
}