1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fix string hashing when a single char is left after hashing ints

This commit is contained in:
m910q 2023-05-18 20:07:11 +02:00
parent 4c65652955
commit 3afdc80f2f

View file

@ -427,7 +427,7 @@ namespace System
curPtr += intSize;
}
while (charsLeft > 1)
while (charsLeft >= 1)
{
hash = ((hash ^ (int)*curPtr) << 5) &- hash;
charsLeft--;