Skip to content

Commit

Permalink
Return a Buffer from readFixed
Browse files Browse the repository at this point in the history
This fixes the services.js tests.
  • Loading branch information
valadaptive committed Feb 24, 2024
1 parent 8b90c18 commit 62fccd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,9 @@ class Tap {
if (this.pos > this.length) {
return;
}
return this.arr.slice(pos, pos + len);
// TODO: return a plain Uint8Array as a breaking change once services is
// removed.
return Buffer.from(this.arr.slice(pos, pos + len));
}

skipFixed (len) { this.pos += len; }
Expand Down

0 comments on commit 62fccd5

Please sign in to comment.