From ab190d38b779dd9efefc4419f7c3a49e2b5c32b7 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 14 Mar 2011 18:23:01 -0700 Subject: [PATCH] Fix buffer.toString('hex') --- lib/buffer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/buffer.js b/lib/buffer.js index d3eb752f17..f4f916ff45 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -42,7 +42,7 @@ SlowBuffer.prototype.hexSlice = function(start, end) { var len = this.length; if (!start || start < 0) start = 0; - if (end < 0 || start + end > len) end = len - start; + if (end < 0) end = len - start; var out = ''; for (var i = start; i < end; i ++) {