buffer: handle UCS2 `.fill()` properly on BE · nodejs/node@d8b6723 · GitHub
Skip to content

Commit d8b6723

Browse files
addaleaxFishrock123
authored andcommitted
buffer: handle UCS2 .fill() properly on BE
There was a byte-order mismatch for `buffer#fill` on big-endian platforms. Weirdly, the tests seemed to expect that wrong behaviour. PR-URL: #9837 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
1 parent 09ec5db commit d8b6723

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/node_buffer.cc

Lines changed: 3 additions & 0 deletions

test/parallel/test-buffer-fill.js

Lines changed: 10 additions & 13 deletions

0 commit comments

Comments
 (0)