mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Corrected fnv1 hash algorithm
This commit is contained in:
@@ -15,7 +15,7 @@ static unsigned int hashString(const char* string, int length) {
|
|||||||
|
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
hash *= string[i];
|
hash *= string[i];
|
||||||
hash *= 16777619;
|
hash ^= 16777619;
|
||||||
}
|
}
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
|
|||||||
Reference in New Issue
Block a user