Skip to content

Commit

Permalink
GODRIVER-1806 Fix wrong conditional in DownloadStream.Skip (#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
ginuerzh authored and Divjot Arora committed Dec 9, 2020
1 parent 54d5c26 commit bcc3386
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mongo/gridfs/download_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func (ds *DownloadStream) Skip(skip int64) (int64, error) {

// try to skip whole chunk if possible
toSkip := 0
if skip-skipped < int64(len(ds.buffer)) {
if skip-skipped >= int64(len(ds.buffer)) {
// can skip whole chunk
toSkip = len(ds.buffer)
} else {
Expand Down

0 comments on commit bcc3386

Please sign in to comment.