Skip to content

Commit

Permalink
slice -> subarray
Browse files Browse the repository at this point in the history
  • Loading branch information
apocas committed Nov 6, 2023
1 parent f49a1c8 commit 110c39b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/modem.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ Modem.prototype.demuxStream = function (streama, stdout, stderr) {
}

function bufferSlice(end) {
var out = buffer.slice(0, end);
buffer = Buffer.from(buffer.slice(end, buffer.length));
var out = buffer.subarray(0, end);
buffer = Buffer.from(buffer.subarray(end, buffer.length));
return out;
}

Expand Down

0 comments on commit 110c39b

Please sign in to comment.