From 6111c17a0e34fbd867660aedc2ae1a4c754492e0 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 15 Mar 2011 11:42:23 -0700 Subject: [PATCH] correct hexSlice end --- lib/buffer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/buffer.js b/lib/buffer.js index 5f0298185ad..23370f7b6cd 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 || end < 0 || end > len) end = len - 1; + if (!end || end < 0 || end > len) end = len; var out = ''; for (var i = start; i < end; i ++) {