Avoid range check error in TObjData.writebytes overloads using dynamic arrays

This commit is contained in:
Pierre Muller 2025-03-25 12:09:06 +01:00
parent 754c40cdb0
commit a74a4aca03

View File

@ -1728,12 +1728,14 @@ implementation
procedure TObjData.writebytes(const Data: TByteDynArray; len: TObjSectionOfs);
begin
WriteBytes(Data[0],len);
if len>0 then
WriteBytes(Data[0],len);
end;
procedure TObjData.writebytes(const Data: TAnsiCharDynArray; len: TObjSectionOfs);
begin
WriteBytes(Data[0],len);
if len>0 then
WriteBytes(Data[0],len);
end;