hash.cpp: merge PR#3 in rokkithash code

This commit is contained in:
cyberman54 2020-12-27 13:12:46 +01:00
parent 310495e61c
commit e48fc5ad3f

View File

@ -61,7 +61,7 @@ uint32_t IRAM_ATTR rokkit(const char *data, int len) {
case 3: case 3:
hash += *((uint16_t *)data); hash += *((uint16_t *)data);
hash ^= hash << 16; hash ^= hash << 16;
hash ^= ((signed char)data[2]) << 18; hash ^= ((unit32_t)data[2]) << 18;
hash += hash >> 11; hash += hash >> 11;
break; break;
case 2: case 2: