-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
In the formula on lines 135 and 154, you perform a bitwise OR when computing a 64-bit hash, like so:
return is32BitHash ? c : (c | ((long) (b << 32)));
This works when c is non-negative, but for negative values of c, the left-most 32 bits will always be 0xffffffff. So (c | anything << 32) will always equal c. I suggest the following replacement:
return is32BitHash ? c : c & 0xffffffffl | (long) b << 32;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels