dataset: fix hash computation

pull/4333/head
Eric Leblond 7 years ago
parent 64a789bbf6
commit 1721da91ef

@ -89,8 +89,9 @@ uint32_t StringHash(void *s)
{
uint32_t hash = 5381;
int c;
uint8_t *sptr = ((StringType *)s)->ptr;
while ((c = *(char *)s++))
while ((c = *sptr++))
hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
return hash;

Loading…
Cancel
Save