Skip to content

Commit 8b1af2f

Browse files
chinedufnsilverwind
authored andcommitted
doc: fix buf.readInt16LE output
Previous example didn't account for the 1 byte offset PR-URL: #5282 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
1 parent ee7754b commit 8b1af2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/buffer.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ const buf = new Buffer([1,-2,3,4]);
728728
buf.readInt16BE();
729729
// returns 510
730730
buf.readInt16LE(1);
731-
// returns -511
731+
// returns 1022
732732
```
733733

734734
### buf.readInt32BE(offset[, noAssert])

0 commit comments

Comments
 (0)