Selaa lähdekoodia

* 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 -
sergei 14 vuotta sitten
vanhempi
commit
0c3c8a8745
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      rtl/objpas/objpas.pp

+ 3 - 3
rtl/objpas/objpas.pp

@@ -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;