bun icon indicating copy to clipboard operation
bun copied to clipboard

Buffer#copy misinterpreting arguments

Open SheetJSDev opened this issue 3 years ago • 0 comments

Repro motivated by NodeJS docs:

const buf1 = Buffer.allocUnsafe(26);
const buf2 = Buffer.allocUnsafe(26).fill('!'.charCodeAt(0));
for (let i = 0; i < 26; i++) buf1[i] = i + 97;
buf1.copy(buf2, 8, 16, 20);
console.log(buf2[9]);

Node prints 114, Bun prints 118

SheetJSDev avatar Aug 02 '22 08:08 SheetJSDev