Skip to content

Commit

Permalink
ensure end doesnt oob
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Feb 13, 2024
1 parent 1243482 commit 3572b75
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/prefetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ module.exports = class Prefetcher {
this.missing++
}

if (end >= this.endBound) end = this.endBound

this.start = start
this.end = end
this.range = this.core.download({
Expand Down

0 comments on commit 3572b75

Please sign in to comment.