Fix buffer test fails.

This commit is contained in:
John-David Dalton
2016-02-05 00:49:39 -08:00
parent 4a805ea666
commit a04fc310b4
2 changed files with 2 additions and 2 deletions

View File

@@ -3719,7 +3719,7 @@
*/
function cloneBuffer(buffer) {
var Ctor = buffer.constructor,
result = new Ctor(buffer.byteLength);
result = new Ctor(buffer.length);
buffer.copy(result);
return result;

View File

@@ -2543,7 +2543,7 @@
assert.expect(3);
if (Buffer) {
var buffer = new Buffer([1, 2, 3]),
var buffer = new Buffer([1, 2]),
actual = func(buffer);
assert.strictEqual(actual.byteLength, buffer.byteLength);