mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Merge pull request #1849 from m910q/FixStringHashing
Fix string hashing when a single char is left after hashing ints
This commit is contained in:
commit
84540431fc
1 changed files with 1 additions and 1 deletions
|
@ -427,7 +427,7 @@ namespace System
|
||||||
curPtr += intSize;
|
curPtr += intSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (charsLeft > 1)
|
while (charsLeft >= 1)
|
||||||
{
|
{
|
||||||
hash = ((hash ^ (int)*curPtr) << 5) &- hash;
|
hash = ((hash ^ (int)*curPtr) << 5) &- hash;
|
||||||
charsLeft--;
|
charsLeft--;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue