* fix SysUtils.HashName as proposed by Awkward in #39827, resolves #39827

* adapted to syscodepages.inc for the fixed HashName
This commit is contained in:
florian 2022-07-06 20:07:39 +02:00
parent 1d32a575e7
commit 4fecfe3df3

View File

@ -64,10 +64,11 @@ end;
Function HashName(Name: PAnsiChar): LongWord;
Var
thehash,g,I : LongWord;
thehash,g : LongWord;
I : SizeInt;
begin
thehash:=0;
For I:=1 to Length(Name) do { 0 terminated }
For I:=0 to StrLen(Name)-1 do { 0 terminated }
begin
thehash:=thehash shl 4;
inc(theHash,Ord(UpCase(Name[i])));