Please sign in to comment.
buffer: coerce offset using Math.trunc()
This is a partial revert of 14d1a8a, which coerced the offset of Buffer#slice() using the | operator. This causes some edge cases to be handled incorrectly. This commit restores the old behavior, but converts offsets to integers using Math.trunc(). This commit does not revert any tests, and adds an additional regression test. Refs: #9096 Refs: #9101 PR-URL: #9341 Reviewed-By: Sakthipriyan Vairamani <firstname.lastname@example.org> Reviewed-By: James M Snell <email@example.com> Reviewed-By: Brian White <firstname.lastname@example.org> Reviewed-By: Trevor Norris <email@example.com>
- Loading branch information...
Showing with 31 additions and 2 deletions.