From ff957615ab5f5d923de948472e30ead6935ccb5e Mon Sep 17 00:00:00 2001 From: xypwn Date: Wed, 3 Apr 2024 08:27:04 +0200 Subject: [PATCH] Fix murmur64a hash Previously, calculated hashes would be wrong if input length was a multiple of 8. --- source/hasher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/hasher.cpp b/source/hasher.cpp index 742037a..fdd26e7 100644 --- a/source/hasher.cpp +++ b/source/hasher.cpp @@ -235,9 +235,9 @@ class hash_murmur_64a : public hellextractor::hash::instance { hash ^= (static_cast(data2[1]) << 8); case 1: hash ^= (static_cast(data2[0])); + hash *= mix; }; - hash *= mix; hash ^= hash >> shifts; hash *= mix;