diff --git a/lib/modem.js b/lib/modem.js index b5f4cfd..c3c3c0c 100644 --- a/lib/modem.js +++ b/lib/modem.js @@ -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; }