Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer: coerce offset using Math.trunc() #9341

Merged
merged 1 commit into from
Nov 5, 2016
Merged

Commits on Nov 5, 2016

  1. 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: nodejs#9096
    Refs: nodejs#9101
    PR-URL: nodejs#9341
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Brian White <mscdex@mscdex.net>
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>
    cjihrig committed Nov 5, 2016
    Configuration menu
    Copy the full SHA
    a02b13f View commit details
    Browse the repository at this point in the history