Skip to content

Commit

Permalink
fix interleaved read
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Dec 20, 2020
1 parent 6f37195 commit bd8f1d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binary/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func Read(b []byte, byteStride uint32, data interface{}) error {
e := int(byteStride)
high := int(n) * e
if byteStride != size {
high -= int(size)
high -= int(byteStride - size)
}
if len(b) < high {
return io.ErrShortBuffer
Expand Down

0 comments on commit bd8f1d7

Please sign in to comment.