All the Buffer#{ascii,hex,etc.}Slice() methods are intentionally strict
to alert if a Buffer instance was attempting to be accessed out of
bounds. Buffer#toString() is the more user friendly way of accessing the
data, and will coerce values to their min/max on overflow.
var str = '';
var max = exports.INSPECT_MAX_BYTES;
if (this.length > 0) {
- str = this.hexSlice(0, max).match(/.{2}/g).join(' ');
+ str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
if (this.length > max)
str += ' ... ';
}