FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: fix buf.readInt16LE output by chinedufn · Pull Request #5282 · nodejs/node · GitHub

/ node Public

doc: fix buf.readInt16LE output - #5282

Closed
chinedufn wants to merge 1 commit into
nodejs:masterfrom
chinedufn:doc/fix-bug-read-int-16
Closed

doc: fix buf.readInt16LE output#5282
chinedufn wants to merge 1 commit into
nodejs:masterfrom
chinedufn:doc/fix-bug-read-int-16

Conversation

Copy link
Copy Markdown
Contributor

No description provided.

Previous example didn't account for the 1 byte offset
Comment thread doc/api/buffer.markdown
// returns 510
buf.readInt16LE(1);
// returns -511
// returns 1022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think the original intent was to read the same two bytes.
cc @jasnell who I believe added this example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Gotcha. Will update to whatever @jasnell thinks here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yep, this was a typo on my part... the second one should be buf.readInt16LE(); (no argument passed in)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

that said, this change works too

mscdex added buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. labels Feb 17, 2016

jasnell commented Feb 19, 2016

Copy link
Copy Markdown
Member

LGTM

Copy link
Copy Markdown
Contributor

LGTM, landed in 8b1af2f.

silverwind closed this Feb 25, 2016
silverwind pushed a commit that referenced this pull request Feb 25, 2016
Previous example didn't account for the 1 byte offset

PR-URL: #5282
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
rvagg pushed a commit that referenced this pull request Feb 27, 2016
Previous example didn't account for the 1 byte offset

PR-URL: #5282
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
rvagg pushed a commit that referenced this pull request Feb 27, 2016
Previous example didn't account for the 1 byte offset

PR-URL: #5282
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Fishrock123 mentioned this pull request Mar 1, 2016
5 tasks
MylesBorins pushed a commit that referenced this pull request Mar 17, 2016
Previous example didn't account for the 1 byte offset

PR-URL: #5282
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this pull request Mar 21, 2016
Previous example didn't account for the 1 byte offset

PR-URL: #5282
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL