Skip to content

Commit

Permalink
Fix murmur64a hash
Browse files Browse the repository at this point in the history
Previously, calculated hashes would be wrong if input length was a multiple of 8.
  • Loading branch information
xypwn committed Apr 3, 2024
1 parent c0e2683 commit ff95761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/hasher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ class hash_murmur_64a : public hellextractor::hash::instance {
hash ^= (static_cast<uint64_t>(data2[1]) << 8);
case 1:
hash ^= (static_cast<uint64_t>(data2[0]));
hash *= mix;
};

hash *= mix;
hash ^= hash >> shifts;

hash *= mix;
Expand Down

0 comments on commit ff95761

Please sign in to comment.