* avoid range check error and overflow in objpas.hash, should resolve #39561

This commit is contained in:
florian 2022-02-12 14:26:31 +01:00
parent ee2d2a4bd4
commit 15b7a8763f

View File

@ -336,7 +336,10 @@ begin
For I:=1 to Length(S) do { 0 terminated }
begin
thehash:=thehash shl 4;
{$push}
{$R-}{$Q-}
inc(theHash,Ord(S[i]));
{$pop}
g:=thehash and LongWord($f shl 28);
if g<>0 then
begin