buffer: fix inspect throw if slice length too long
authorTrevor Norris <trev.norris@gmail.com>
Thu, 22 Aug 2013 05:18:20 +0000 (22:18 -0700)
committerTrevor Norris <trev.norris@gmail.com>
Thu, 22 Aug 2013 05:18:20 +0000 (22:18 -0700)
commitfa89cf545cad2ae6fc2ed15006b9c118cb9077d2
treed8f0f334b52835501f5b0b2caba3832f3ff62473
parent2769d97e67cb510706318f1c4a66e98a93472654
buffer: fix inspect throw if slice length too long

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.
lib/buffer.js