Skip to content

Commit

Permalink
Guard against drop 0, contig
Browse files Browse the repository at this point in the history
  • Loading branch information
LuKks committed Jul 6, 2023
1 parent 6f07eb4 commit bbebc1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ module.exports = class Hypercore extends EventEmitter {
if (bitfield) {
const contig = this.core.header.contiguousLength

if (bitfield.start < contig) {
if (bitfield.start < contig && !bitfield.drop) {
this.replicator.onhave(0, contig, bitfield.drop)
} else {
this.replicator.onhave(bitfield.start, bitfield.length, bitfield.drop)
Expand Down

0 comments on commit bbebc1e

Please sign in to comment.