Closed valadaptive closed 1 year ago
In Tap, there are a lot of this.pos > buf.length checks. Since Buffer.length is always 1 greater than the last valid byte index, shouldn't they be this.pos >= buf.length instead?
Tap
this.pos > buf.length
Buffer.length
this.pos >= buf.length
this.pos represents the position of the next write so these checks may be fine. Is there one in particular that looks suspicious to you?
this.pos
Seems to all work out now; never mind
In
Tap
, there are a lot ofthis.pos > buf.length
checks. SinceBuffer.length
is always 1 greater than the last valid byte index, shouldn't they bethis.pos >= buf.length
instead?