* fixed alignment of dyn. arrays

git-svn-id: trunk@6458 -
This commit is contained in:
florian 2007-02-12 18:41:21 +00:00
parent b5b86f6d73
commit 4575c9f424

View File

@ -2307,8 +2307,11 @@ implementation
function tarraydef.alignment : shortint;
begin
{ alignment of dyn. arrays doesn't depend on the element size }
if (ado_IsDynamicArray in arrayoptions) then
alignment:=size_2_align(sizeof(aint))
{ alignment is the size of the elements }
if (elementdef.typ in [arraydef,recorddef]) or
else if (elementdef.typ in [arraydef,recorddef]) or
((elementdef.typ=objectdef) and
is_object(elementdef)) then
alignment:=elementdef.alignment