Fix hash_map hashing (hopefully the final time)

This commit is contained in:
Stephen Seo 2024-06-28 18:17:38 +09:00
parent c5b2ca6dff
commit da72a2387f

View file

@ -74,7 +74,8 @@ unsigned long long simple_archiver_hash_map_internal_key_to_hash(
unsigned long long temp = 0;
unsigned int count = 0;
for (unsigned int idx = 0; idx < key_size; ++idx) {
temp |= ((unsigned long long)*((unsigned char *)key)) << (8 * count);
temp |= ((unsigned long long)*((unsigned char *)key + count))
<< (8 * count);
++count;
if (count >= 8) {
count = 0;