We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 13d9368 + e10812d commit f19ae57Copy full SHA for f19ae57
internal/transfer/block_reader.go
@@ -123,10 +123,13 @@ func (br *BlockReader) Read(b []byte) (int, error) {
123
// isn't connected, or the resulting offset would be out of bounds or too far
124
// ahead) or the copy failed for some other reason.
125
func (br *BlockReader) Skip(n int64) error {
126
+ if n == 0 {
127
+ return nil
128
+ }
129
blockSize := int64(br.Block.GetB().GetNumBytes())
130
resultingOffset := br.Offset + n
131
- if br.stream == nil || n <= 0 || n > maxSkip || resultingOffset >= blockSize {
132
+ if br.stream == nil || n < 0 || n > maxSkip || resultingOffset >= blockSize {
133
return errors.New("unable to skip")
134
}
135
0 commit comments