From 3afdc80f2f39c72a79800656085b432d34b2bb90 Mon Sep 17 00:00:00 2001 From: m910q Date: Thu, 18 May 2023 20:07:11 +0200 Subject: [PATCH] Fix string hashing when a single char is left after hashing ints --- BeefLibs/corlib/src/String.bf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeefLibs/corlib/src/String.bf b/BeefLibs/corlib/src/String.bf index eb75379d..b5e5d97e 100644 --- a/BeefLibs/corlib/src/String.bf +++ b/BeefLibs/corlib/src/String.bf @@ -427,7 +427,7 @@ namespace System curPtr += intSize; } - while (charsLeft > 1) + while (charsLeft >= 1) { hash = ((hash ^ (int)*curPtr) << 5) &- hash; charsLeft--;