summaryrefslogtreecommitdiff
path: root/lib/net.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-04-05 17:54:48 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-04-05 18:10:36 -0700
commit53dd9fe200d7cd1d6f3e5c5a96891b778303be37 (patch)
tree21ba2286428cd0d0c5e850989dbaa903a4fba12e /lib/net.js
parent4befe93a4b4373cf2c3171d94e60a99bac854ee8 (diff)
downloadnode-new-53dd9fe200d7cd1d6f3e5c5a96891b778303be37.tar.gz
Fix bug in buffer.utf8Write() which included \u0000
Diffstat (limited to 'lib/net.js')
-rw-r--r--lib/net.js2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/net.js b/lib/net.js
index 0e04cc45ad..58da9f735f 100644
--- a/lib/net.js
+++ b/lib/net.js
@@ -453,8 +453,6 @@ Stream.prototype._writeOut = function (data, encoding) {
} else {
// default to utf8
bytesWritten = pool.utf8Write(data, pool.used);
- // Don't include the null
- if (pool[pool.used + bytesWritten-1] == 0) bytesWritten--;
// XXX Hacky way to find out the number of characters written.
// Waiting for a more optimal way: http://codereview.chromium.org/1539013
var _s = pool.utf8Slice(pool.used, pool.used + bytesWritten);