Buffer.prototype.asciiSlice
, etc use offset, length
instead of start, end
#2538
Labels
Buffer.prototype.asciiSlice
, etc use offset, length
instead of start, end
#2538
The following is fine in Node.js:
But in workerd it throws:
Relevant source for us:
workerd/src/node/internal/internal_buffer.ts
Lines 758 to 799 in 7aa2d5f
Relevant source for Node.js:
https://github.com/nodejs/node/blob/8d3758487498e3c1edfd0f6f4d36d0fb3a3fab4e/src/node_buffer.cc#L545-L551
(Note also that Node.js allows
end < start
so long as both are not out of bounds and sets:if (end < start) end = start
)The text was updated successfully, but these errors were encountered: