Files
node/test/parallel
Anna Henningsen 40c7ec62e0 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: https://github.com/nodejs/node/issues/9836
PR-URL: https://github.com/nodejs/node/pull/9837
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2017-01-31 17:07:49 -05:00
..
2016-12-26 14:09:46 +01:00
2016-12-20 14:42:45 -05:00
2017-01-31 17:07:46 -05:00
2017-01-31 17:07:48 -05:00
2017-01-31 17:07:48 -05:00
2017-01-31 17:07:48 -05:00
2017-01-31 17:07:48 -05:00
2017-01-31 17:07:48 -05:00
2017-01-31 17:07:48 -05:00
2017-01-31 17:07:48 -05:00
2017-01-31 17:07:48 -05:00