Skip to content

Commit

Permalink
Update deps/lua/src/lstring.c
Browse files Browse the repository at this point in the history
Signed-off-by: Madelyn Olson <[email protected]>
  • Loading branch information
madolson authored Oct 15, 2024
1 parent a39bb6b commit c235d93
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions deps/lua/src/lstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,19 @@ uint32_t murmur32(const uint8_t* key, size_t len, uint32_t seed) {
}

const uint8_t* tail = (const uint8_t*) (key + nblocks * 4);
uint32_t k1 = 0;
switch (len & 3) {
case 3:
k1 ^= tail[2] << 16;
case 2:
k1 ^= tail[1] << 8;
case 1:
k1 ^= tail[0];
k1 *= c1;
k1 = (k1 << r1) | (k1 >> (32 - r1));
k1 *= c2;
hash ^= k1;
}
uint32_t k1 = 0;
switch (len & 3) {
case 3:
k1 ^= tail[2] << 16;
case 2:
k1 ^= tail[1] << 8;
case 1:
k1 ^= tail[0];
k1 *= c1;
k1 = (k1 << r1) | (k1 >> (32 - r1));
k1 *= c2;
hash ^= k1;
}

hash ^= len;
hash ^= (hash >> 16);
Expand Down

0 comments on commit c235d93

Please sign in to comment.