From: Feross Aboukhadijeh Date: Sat, 9 Jan 2016 14:27:22 +0000 (+0100) Subject: fix buf introduced in PR #92 X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=7ab2cf78b5b87c26f4d42dcc9639fcbffe52a993;p=buffer.git fix buf introduced in PR #92 --- diff --git a/index.js b/index.js index 79c1198..d028aa5 100644 --- a/index.js +++ b/index.js @@ -191,7 +191,7 @@ function fromArrayBuffer (that, array) { that.__proto__ = Buffer.prototype } else { // Fallback: Return an object instance of the Buffer class - that = fromTypedArray(that, array) + that = fromTypedArray(that, new Uint8Array(array)) } return that }