mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-01 14:30:56 +00:00
sanitize util_hthash with a hack
To silence the address sanitizer. Since this is gone in the master branch anyway this will have to do.
This commit is contained in:
parent
0258612815
commit
e160c9ed7a
1 changed files with 3 additions and 1 deletions
4
stat.c
4
stat.c
|
@ -416,7 +416,9 @@ GMQCC_INLINE size_t util_hthash(hash_table_t *ht, const char *key) {
|
||||||
uint32_t h = 0x1EF0 ^ len;
|
uint32_t h = 0x1EF0 ^ len;
|
||||||
|
|
||||||
for (i = -((int)block); i; i++) {
|
for (i = -((int)block); i; i++) {
|
||||||
k = blocks[i];
|
uint32_t hack;
|
||||||
|
memcpy(&hack, &blocks[i], sizeof(hack));
|
||||||
|
k = hack;
|
||||||
k *= mask1;
|
k *= mask1;
|
||||||
k = GMQCC_ROTL32(k, 15);
|
k = GMQCC_ROTL32(k, 15);
|
||||||
k *= mask2;
|
k *= mask2;
|
||||||
|
|
Loading…
Reference in a new issue