Fixed second part of issue #584

This commit is contained in:
Martin Gerhardy 2017-12-31 17:29:52 +01:00
parent be55f26a9f
commit 107c920fb0

View File

@ -5693,13 +5693,14 @@ nk_murmur_hash(const void * key, int len, nk_hash seed)
tail = (const nk_byte*)(data + nblocks*4); tail = (const nk_byte*)(data + nblocks*4);
k1 = 0; k1 = 0;
switch (len & 3) { switch (len & 3) {
case 3: k1 ^= (nk_uint)(tail[2] << 16); case 3: k1 ^= (nk_uint)(tail[2] << 16); /* fallthrough */
case 2: k1 ^= (nk_uint)(tail[1] << 8u); case 2: k1 ^= (nk_uint)(tail[1] << 8u); /* fallthrough */
case 1: k1 ^= tail[0]; case 1: k1 ^= tail[0];
k1 *= c1; k1 *= c1;
k1 = NK_ROTL(k1,15); k1 = NK_ROTL(k1,15);
k1 *= c2; k1 *= c2;
h1 ^= k1; h1 ^= k1;
break;
default: break; default: break;
} }