Skip to content

Commit

Permalink
[#3145] byteOffset of typedArray is not handled properly
Browse files Browse the repository at this point in the history
  • Loading branch information
codepage949 committed Mar 19, 2022
1 parent b609df4 commit 87be279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/input.js
Expand Up @@ -39,7 +39,7 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
if (input.length === 0) {
throw Error('Input Bit Array is empty');
}
inputDescriptor.buffer = Buffer.from(input.buffer);
inputDescriptor.buffer = Buffer.from(input.buffer, input.byteOffset, input.byteLength);
} else if (is.plainObject(input) && !is.defined(inputOptions)) {
// Plain Object descriptor, e.g. create
inputOptions = input;
Expand Down

0 comments on commit 87be279

Please sign in to comment.