diff options
author | Eric Anholt <eric@anholt.net> | 2009-11-25 06:30:24 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-11-25 06:33:00 -0800 |
commit | 5997320dcae4d48c98f403b158b7f7be2d3022fd (patch) | |
tree | fa85d1121286c86da265426a6c120a9b3ec054af | |
parent | 1a26ea651b03759c8b5ba98dd8fc81aae227fbc9 (diff) |
fnv1a: use the correct offset basis so that 0-filled buffers hash by length.
Reported by: Chris Wilson
-rw-r--r-- | fnv_hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -38,7 +38,7 @@ uint32_t fnv1_hash_string(const void *key) { - uint32_t hash = 0; + uint32_t hash = 2166136261ul; const unsigned char *str = key; while (*str != 0) { |