This commit is contained in:
Jan Nieuwenhuizen 2019-10-25 13:55:32 +02:00
parent ef6f138097
commit 39d6995769
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ hash_cstring (char const *s, long size)
int hash = s[0] * 37;
if (s[0] != 0)
if (s[1] != 0)
hash = hash + s[1] * 43;
hash = hash + (s[1] * 43);
assert_msg (size != 0, "size");
hash = hash % size;
return hash;