From f7d420908480b918593b6d51c10dd0011afdafd1 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 2 Mar 2019 23:21:13 +0000 Subject: [PATCH] Use lowercase when computing hashes in hash_getcode() It turns out hash_findcase() has never worked properly because the correct bucket would never have been searched. git-svn-id: https://svn.eduke32.com/eduke32@7364 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/include/hash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/build/include/hash.h b/source/build/include/hash.h index a5e23b4f3..c865a85a0 100644 --- a/source/build/include/hash.h +++ b/source/build/include/hash.h @@ -29,7 +29,7 @@ static inline uint32_t hash_getcode(const char *s) uint32_t h = 5381; int32_t ch; - while ((ch = *s++) != '\0') + while ((ch = Btolower(*s++)) != '\0') h = ((h << 5) + h) ^ ch; return h;