-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: Buffer buf.readInt32LE(offset[, noAssert]) example incorrect #5889
Labels
doc
Issues and PRs related to the documentations.
good first issue
Issues that are suitable for first-time contributors.
Comments
Looks like you're right. It should be |
cjihrig
added
good first issue
Issues that are suitable for first-time contributors.
doc
Issues and PRs related to the documentations.
labels
Mar 24, 2016
Also the documentation of the EDIT: Nevermind |
2 tasks
evanlucas
pushed a commit
that referenced
this issue
Mar 30, 2016
Update example of readInt32LE method. buf.readInt32LE(1) is supposed to throw an error as it has only four elements and it tries to read 32 bits from three bytes. Fixes: #5889 PR-URL: #5890 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
evanlucas
pushed a commit
that referenced
this issue
Mar 31, 2016
Update example of readInt32LE method. buf.readInt32LE(1) is supposed to throw an error as it has only four elements and it tries to read 32 bits from three bytes. Fixes: #5889 PR-URL: #5890 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
MylesBorins
pushed a commit
that referenced
this issue
Apr 9, 2016
Update example of readInt32LE method. buf.readInt32LE(1) is supposed to throw an error as it has only four elements and it tries to read 32 bits from three bytes. Fixes: #5889 PR-URL: #5890 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
doc
Issues and PRs related to the documentations.
good first issue
Issues that are suitable for first-time contributors.
The example for
buf.readInt32LE(offset[, noAssert])
appears to be incorrect.Running locally in a REPL:
The
offset
check is something likeoffset + 3 < buffer.length
, so4 < 4
fails as it should.The text was updated successfully, but these errors were encountered: