Browse Source

--- Merging r19034 into '.':
U rtl/objpas/objpas.pp

# revisions: 19034
------------------------------------------------------------------------
r19034 | sergei | 2011-09-08 21:15:34 +0200 (Thu, 08 Sep 2011) | 1 line
Changed paths:
M /trunk/rtl/objpas/objpas.pp

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

git-svn-id: branches/fixes_2_6@19150 -

marco 14 years ago
parent
commit
d8c5ba552e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      rtl/objpas/objpas.pp

+ 3 - 3
rtl/objpas/objpas.pp

@@ -330,7 +330,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);
@@ -359,7 +359,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);
@@ -456,7 +456,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;