I have the following type:
EntryData = packed record
group : packed array[1..256] of char;
group_id: TGuid;
// entries array length is dynamic, each packed array of char (string) can have any length and it cannot change, must be fixed length always
entries : packed array of packed array of char;
end;
The problem is when I set the content of the strings in the dynamic array, FPC changes its length.
SetLength(data[0].entries[0], 64);
SetLength(data[0].entries[1], 80);
data[0].entries[0] := 'eTyWw6TtLFpkFd1XD3vB';
data[0].entries[1] := 'GhW2C1i7e3xEay2ak';
After setting data FPC changes length to other value othen than 64, 80 respectively. And it is bringing trouble as the data is expected to be that length when written to file as returned by
Length().
Is there anything I can do to prevent that behavior?
Thank you!