2
0
Эх сурвалжийг харах

* fix for fpc_copy on 64 bit systems from Florian

git-svn-id: trunk@7713 -
Jonas Maebe 18 жил өмнө
parent
commit
d9284963b3
1 өөрчлөгдсөн 5 нэмэгдсэн , 2 устгасан
  1. 5 2
      rtl/inc/rtti.inc

+ 5 - 2
rtl/inc/rtti.inc

@@ -255,9 +255,11 @@ begin
         namelen:=Temp^;
         inc(temp,namelen+1);
         temp:=aligntoptr(temp);
+
         { Element size }
         size:=PSizeInt(Temp)^;
         inc(Temp,sizeof(Size));
+
         { Element count }
         Count:=PSizeInt(Temp)^;
         inc(Temp,sizeof(Count));
@@ -283,9 +285,10 @@ begin
 
         { Skip size }
         inc(Temp,4);
+
         { Element count }
         Count:=PLongint(Temp)^;
-        inc(Temp,sizeof(Count));
+        inc(Temp,sizeof(longint));
         expectedoffset:=0;
         { Process elements with rtti }
         for i:=1 to count Do
@@ -295,7 +298,7 @@ begin
             Offset:=PLongint(Temp)^;
             if Offset>expectedoffset then
               move((Src+expectedoffset)^,(Dest+expectedoffset)^,Offset-expectedoffset);
-            inc(Temp,sizeof(Offset));
+            inc(Temp,sizeof(longint));
             copiedsize:=fpc_Copy_internal(Src+Offset,Dest+Offset,Info);
             expectedoffset:=Offset+copiedsize;
           end;