diff --git a/m-core.h b/m-core.h index ba6c7c96..fa9d8098 100644 --- a/m-core.h +++ b/m-core.h @@ -655,7 +655,7 @@ #define M_HASH_CALC(h1,h2) ((h2) + ((h1) << 6) + ((h1) << 16) - (h1)) #elif defined(M_USE_DEKHASH) #define M_HASH_INIT 0UL /* should be len but not possible with interface */ -#define M_HASH_CALC(h1,h2) (((h1)<<5) ^ (h1 >> 27) ^(h2)) +#define M_HASH_CALC(h1,h2) ( (((h1)<<5) | (h1 >> (CHAR_BIT*sizeof(size_t)-5))) ^(h2)) #elif defined(M_USE_BPHASH) #define M_HASH_INIT 0UL #define M_HASH_CALC(h1,h2) (((h1) << 7) ^ (h2))