Browse Source

* handle records with managed fields correctly after attribute merge fixes

git-svn-id: trunk@42480 -
florian 6 years ago
parent
commit
a60ab40237
1 changed files with 6 additions and 1 deletions
  1. 6 1
      rtl/inc/rtti.inc

+ 6 - 1
rtl/inc/rtti.inc

@@ -401,11 +401,16 @@ begin
           recordop^.Copy(Src,Dest)
           recordop^.Copy(Src,Dest)
         else
         else
           begin
           begin
-{$endif VER3_0}
+            Result:=PRecordInfoInit(Temp)^.Size;
+            EleCount:=PRecordInfoInit(Temp)^.Count;
+            { Get element info, hacky, but what else can we do? }
+            Temp:=Pointer(@PRecordInfoInit(Temp)^.Count)+SizeOf(PRecordInfoInit(Temp)^.Count);
+{$else VER3_0}
             Result:=PRecordInfoFull(Temp)^.Size;
             Result:=PRecordInfoFull(Temp)^.Size;
             EleCount:=PRecordInfoFull(Temp)^.Count;
             EleCount:=PRecordInfoFull(Temp)^.Count;
             { Get element info, hacky, but what else can we do? }
             { Get element info, hacky, but what else can we do? }
             Temp:=Pointer(@PRecordInfoFull(Temp)^.Count)+SizeOf(PRecordInfoFull(Temp)^.Count);
             Temp:=Pointer(@PRecordInfoFull(Temp)^.Count)+SizeOf(PRecordInfoFull(Temp)^.Count);
+{$endif VER3_0}
             expectedoffset:=0;
             expectedoffset:=0;
             { Process elements with rtti }
             { Process elements with rtti }
             for i:=1 to EleCount Do
             for i:=1 to EleCount Do