Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

utils: rename readInt32LE to readUInt32LE for clarity #66

Merged
merged 1 commit into from
Sep 10, 2018

Conversation

ChALkeR
Copy link
Contributor

@ChALkeR ChALkeR commented Aug 2, 2018

Rename utils.readInt32LE to utils.readUInt32LE for clarity, as that is actually performing an unsigned int32 read, as seen in the comment on the first line of the impl.

This is mostly a code style change that shouldn't affect the behavior.
See #65 for an actual bug fix (which was caused by an int/uint mixup).

On a side note: I am not exactly sure what do you mean by «as the Buffer ones from node and browserify are incompatible» and suppose that it might have been just another int/uint mixup here.
But I didn't touch that to be on the safe side.

Perhaps a better way would be to remove that method whatsoever and just use buffer.readUInt32LE.
Thoughts?

It is actually performing an unsigned int32 read, as
seen in the comment on the first line.
@pierrec
Copy link
Owner

pierrec commented Sep 10, 2018

I dont really remember why I had to define this method.
Would need to test it again now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants