0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

correct hexSlice end

This commit is contained in:
Ryan Dahl 2011-03-15 11:42:23 -07:00
parent 3c9fb3ec1a
commit 6111c17a0e

View File

@ -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 ++) {