summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-08-10 10:58:09 +0200
committerTyge Løvset <[email protected]>2020-08-10 10:58:09 +0200
commitc9ca3aa7400dfb291d0d85e5053f9701be765145 (patch)
treec92943968d01bd94269c9345a31af49a4b54e082
parent70decdb703f5d053da3dbe349e9a7328a14aa1f2 (diff)
downloadSTC-modified-c9ca3aa7400dfb291d0d85e5053f9701be765145.tar.gz
STC-modified-c9ca3aa7400dfb291d0d85e5053f9701be765145.zip
Minor
-rw-r--r--stc/cmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/stc/cmap.h b/stc/cmap.h
index dfb845a2..a984c711 100644
--- a/stc/cmap.h
+++ b/stc/cmap.h
@@ -389,7 +389,7 @@ STC_API uint32_t c_default_hash(const void *data, size_t len) {
/* https://probablydance.com/2018/06/16/fibonacci-hashing-the-optimization-that-the-world-forgot-or-a-better-alternative-to-integer-modulo/ */
STC_API uint32_t c_default_hash32(const void* data, size_t len) {
const volatile uint32_t *key = (const uint32_t *) data;
- uint32_t x = *key++ * 2654435769u;
+ uint64_t x = *key++ * 2654435769u;
while (len -= 4) x ^= *key++ * 2654435769u;
return x;
}