mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 16:09:31 +02:00
* Use Align function to align fields in record-buffer
git-svn-id: trunk@11164 -
This commit is contained in:
parent
9fb37eb246
commit
f92e594e56
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user