mirror of https://github.com/lukechilds/node.git
Browse Source
Before this commit, DecodeWrite() mistakenly tried to convert buffers to UTF-8 strings which: a) produced invalid character sequences when the buffer contained octets > 127, and b) lead to spurious test failures because DecodeWrite() wrote less bytes than DecodeBytes() said it would, with the remainder either containing zeros or garbage Fix that by simply copying the buffer's data to the target buffer when the encoding is BINARY or by converting the buffer to a binary string when it's UTF8 or ASCII. Fixes #3651, #3866.v0.8.7-release
Ben Noordhuis
13 years ago
1 changed files with 19 additions and 1 deletions
Loading…
Reference in new issue