Missing the length of the encoding byte when calling b.Range

Signed-off-by: naivewong <867245430@qq.com>
This commit is contained in:
Alec 2019-01-28 18:33:44 +08:00 committed by Krasi Georgiev
parent a44d15798e
commit 051a7ae1a7
1 changed files with 1 additions and 1 deletions

View File

@ -373,7 +373,7 @@ func (s *Reader) Chunk(ref uint64) (chunkenc.Chunk, error) {
if n <= 0 { if n <= 0 {
return nil, errors.Errorf("reading chunk length failed with %d", n) return nil, errors.Errorf("reading chunk length failed with %d", n)
} }
r = b.Range(off+n, off+n+int(l)) r = b.Range(off+n, off+n+1+int(l))
return s.pool.Get(chunkenc.Encoding(r[0]), r[1:1+l]) return s.pool.Get(chunkenc.Encoding(r[0]), r[1:1+l])
} }