From 79b1c22c9fbb74199ed432c553674da8f96f642e Mon Sep 17 00:00:00 2001 From: Chinedu Francis Nwafili Date: Wed, 17 Feb 2016 08:11:53 -0500 Subject: [PATCH] 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 Reviewed-By: Roman Reiss --- doc/api/buffer.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index ab1ee5a6c0..67ff4079ce 100644 --- a/doc/api/buffer.markdown +++ b/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])