Skip to content

buffer: fix creating from zero-length ArrayBuffer

Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • the commit message follows commit guidelines
Affected core subsystem(s)

buffer

Description of change

Fixes regression introduced in https://github.com/nodejs/node/commit/85ab4a5f1281c4e1dd06450ac7bd3250326267fa where creating a new Buffer from an empty ArrayBuffer would fail.

Initially found in #6893.

cc @trevnorris @addaleax @ChALkeR

Merge request reports

Loading