buffer: fix Buffer::Copy regression from 00b4b7bb
If the end argument is omitted or not a number, make it default to the end of the buffer, not zero. Ideally, it should not matter what it defaults to because the JS shim in lib/buffer.js should handle that but there are still several places in node.js core that secrete SlowBuffers, hence Buffer::Copy() gets called without going through Buffer.prototype.copy() first.
parent
0972acb5
Please register or sign in to comment