Zero bitmap storage when reusing it for container-as-bitmap

If you don't do this, it works fine the first time you use a given
storage, but after that you start seeing spurious bits.
This commit is contained in:
Seebs 2019-11-22 13:52:05 -06:00
parent 397d93e84b
commit 36ef82d7ac

View file

@ -428,6 +428,9 @@ func (c *Container) AsBitmap(target []uint64) (out []uint64) {
out = make([]uint64, 1024)
} else {
out = target
for i := range out {
out[i] = 0
}
}
if c.typeID == containerArray {
a := c.array()