|
@@ -820,7 +820,12 @@ function DynArrayIndex(a: Pointer; const indices: array of SizeInt; typeInfo: Po
|
|
a := PPointerArray(a)^[indices[i]];
|
|
a := PPointerArray(a)^[indices[i]];
|
|
|
|
|
|
{ skip kind and name }
|
|
{ skip kind and name }
|
|
- typeInfo:=(typeInfo+2+PByte(typeInfo)[1]);
|
|
|
|
|
|
+{$ifdef VER3_0}
|
|
|
|
+ typeInfo:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
|
|
|
|
+{$else VER3_0}
|
|
|
|
+ typeInfo:=aligntoqword(typeInfo+2+PByte(typeInfo)[1]);
|
|
|
|
+{$endif VER3_0}
|
|
|
|
+
|
|
{ store the last element size for the index calculation }
|
|
{ store the last element size for the index calculation }
|
|
elsize:=pdynarraytypedata(typeInfo)^.elSize;
|
|
elsize:=pdynarraytypedata(typeInfo)^.elSize;
|
|
{ element type info}
|
|
{ element type info}
|
|
@@ -834,9 +839,6 @@ function DynArrayIndex(a: Pointer; const indices: array of SizeInt; typeInfo: Po
|
|
exit(nil);
|
|
exit(nil);
|
|
end;
|
|
end;
|
|
|
|
|
|
- { skip kind and name }
|
|
|
|
- typeInfo:=(typeInfo+2+PByte(typeInfo)[1]);
|
|
|
|
-
|
|
|
|
result:=@(PByte(a)[indices[h]*elsize]);
|
|
result:=@(PByte(a)[indices[h]*elsize]);
|
|
end;
|
|
end;
|
|
|
|
|