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: fix single-character string filling #9837

Closed
wants to merge 2 commits into from

Commits on Dec 12, 2016

  1. 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.
    addaleax committed Dec 12, 2016
    Configuration menu
    Copy the full SHA
    cea2194 View commit details
    Browse the repository at this point in the history
  2. buffer: fix single-character string filling

    Fix the fast path for `buffer.fill()` with a single-character string.
    
    The fast path only works for strings that are equivalent to a
    single-byte buffer, but that condition was not checked properly
    for the `utf8` or `utf16le` encodings and is always true for the
    `latin1` encoding.
    
    This change fixes these problems.
    
    Fixes: nodejs#9836
    addaleax committed Dec 12, 2016
    Configuration menu
    Copy the full SHA
    b0a80b7 View commit details
    Browse the repository at this point in the history