* Use Align function to align fields in record-buffer

git-svn-id: trunk@11164 -
This commit is contained in:
joost 2008-06-01 22:26:57 +00:00
parent 9fb37eb246
commit f92e594e56

View File

@ -1808,8 +1808,7 @@ var x : longint;
begin
FNullmaskSize := 1+((FieldDefs.count-1) div 8);
{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
if (FNullmaskSize and 3 <> 0) then
FNullmaskSize := (FNullmaskSize and not 3)+4;
FNullmaskSize:=Align(FNullmaskSize,4);
{$ENDIF}
FRecordSize := FNullmaskSize;
SetLength(FFieldBufPositions,FieldDefs.count);
@ -1818,8 +1817,7 @@ begin
FFieldBufPositions[x] := FRecordSize;
inc(FRecordSize, GetFieldSize(FieldDefs[x]));
{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
if (FRecordSize and 3 <> 0) then
FRecordSize := (FRecordSize and not 3)+4;
FRecordSize:=Align(FRecordSize,4);
{$ENDIF}
end;
end;