Fix small bug in RLE

Thanks @frrist

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-01-30 15:18:54 -08:00
parent b42e481600
commit 6ed57ede6a
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA
2 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ func (bv *wbitvec) Out() []byte {
}
if bv.bitCap > 8 {
// if we store some needed bits in second byte, save them also
bv.buf = append(bv.buf, byte(bv.bitCap>>8))
bv.buf = append(bv.buf, byte(bv.bits>>8))
bv.index++
bv.bits = bv.bits - 8
}

View File

@ -8,8 +8,8 @@ import (
func Sum(a, b RunIterator) (RunIterator, error) {
it := addIt{a: a, b: b}
it.prep()
return &it, nil
return &it, it.prep()
}
type addIt struct {