Browse Source

doc: fix buf.readInt16LE output

Previous example didn't account for the 1 byte offset

PR-URL: https://github.com/nodejs/node/pull/5282
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
v5.x
Chinedu Francis Nwafili 9 years ago
committed by Rod Vagg
parent
commit
79b1c22c9f
  1. 2
      doc/api/buffer.markdown

2
doc/api/buffer.markdown

@ -728,7 +728,7 @@ const buf = new Buffer([1,-2,3,4]);
buf.readInt16BE();
// returns 510
buf.readInt16LE(1);
// returns -511
// returns 1022
```
### buf.readInt32BE(offset[, noAssert])

Loading…
Cancel
Save