Skip to content

Conversation

@Llorx
Copy link

@Llorx Llorx commented Oct 3, 2023

When you shift bits to the left, it is a signed operation (there's no unsigned left shift). If it ends being a 32 bit integer, if the leftmost bit is 1 it is going to convert to a negative number. You need to do an unsigned shift to the right with 0 displacement to keep the unsigned integer.

I only fixed the hash32 method as this one is the one I needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant