* Cast HashValue to Longint, otherwise empty strings (which have hash=$FFFFFFFF) cause range check error when RTL is compiled with -Cr.

git-svn-id: trunk@19034 -
This commit is contained in:
sergei 2011-09-08 19:15:34 +00:00
parent 376d34ebdf
commit 0c3c8a8745

View File

@ -363,7 +363,7 @@ begin
inc(ResStr);
while ResStr<Tables[I].TableEnd do
begin
s:=SetFunction(ResStr^.Name,ResStr^.DefaultValue,ResStr^.HashValue,arg);
s:=SetFunction(ResStr^.Name,ResStr^.DefaultValue,Longint(ResStr^.HashValue),arg);
if s<>'' then
ResStr^.CurrentValue:=s;
inc(ResStr);
@ -395,7 +395,7 @@ begin
inc(ResStr);
while ResStr<Tables[I].TableEnd do
begin
s:=SetFunction(ResStr^.Name,ResStr^.DefaultValue,ResStr^.HashValue,arg);
s:=SetFunction(ResStr^.Name,ResStr^.DefaultValue,Longint(ResStr^.HashValue),arg);
if s<>'' then
ResStr^.CurrentValue:=s;
inc(ResStr);
@ -497,7 +497,7 @@ begin
With Tables[I]^ do
For J:=0 to Count-1 do
With ResRec[J] do
CurrentValue:=SetFunction(Name,DefaultValue,HashValue,arg);
CurrentValue:=SetFunction(Name,DefaultValue,Longint(HashValue),arg);
end;