summaryrefslogtreecommitdiffhomepage
path: root/include/stc/ccommon.h
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-04-24 08:52:15 +0200
committerTyge Løvset <[email protected]>2023-04-24 08:52:15 +0200
commit38aab1d6ae8f929084ae6c67256a87760cc07705 (patch)
tree621fbe64cdb6432d945727ca100fd97b3f53aad5 /include/stc/ccommon.h
parent3139f550e2af86003e08f0795e395690c120d63e (diff)
downloadSTC-modified-38aab1d6ae8f929084ae6c67256a87760cc07705.tar.gz
STC-modified-38aab1d6ae8f929084ae6c67256a87760cc07705.zip
Fixed another cmap issue
Diffstat (limited to 'include/stc/ccommon.h')
-rw-r--r--include/stc/ccommon.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stc/ccommon.h b/include/stc/ccommon.h
index bac25fb1..121bc566 100644
--- a/include/stc/ccommon.h
+++ b/include/stc/ccommon.h
@@ -147,7 +147,7 @@ STC_INLINE uint64_t cfasthash(const void* key, intptr_t len) {
case 0: return 1;
}
const uint8_t *x = (const uint8_t*)key;
- uint64_t h = *x | (*x << 15), n = (uint64_t)len >> 3;
+ uint64_t h = (*x << 15) - *x, n = (uint64_t)len >> 3;
len &= 7;
while (n--) {
memcpy(&u8, x, 8), x += 8;