From 3572b75e928e6959d48fe6a90011f778bcf0116d Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Tue, 13 Feb 2024 14:11:19 +0100 Subject: [PATCH] ensure end doesnt oob --- lib/prefetcher.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/prefetcher.js b/lib/prefetcher.js index a89bbab..4b2f7ce 100644 --- a/lib/prefetcher.js +++ b/lib/prefetcher.js @@ -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({