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>
v4.x
Chinedu Francis Nwafili 9 years ago
committed by Myles Borins
parent
commit
ba5e0b6110
  1. 2
      doc/api/buffer.markdown

2
doc/api/buffer.markdown

@ -715,7 +715,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