Hello verybody,
I work with lazarus v 2.0.12 on Windows10
both with 64bit
I have problems with dynamic arrays.
In my code it seems to me that fillchar does not work with dynamic arrays
{$DEFINE dyn}
procedure TSimpleFrm.FormShow(Sender: TObject);
var
ar1 : array of byte;
ar2 : array [0..99] of byte;
begin
{$IFDEF dyn}
setLength(ar1, 100);
fillchar (ar1, SizeOf(ar1),1);
{$ENDIF}
fillchar (ar2, SizeOf(ar2),1);
end;
gives the error
Projekt simple has Exception-class »External: SIGSEGV« on address 10000D2FF
but it works if dyn is undefined
You could circumvent this problem of course, but I have similar problems with
AES
DCP_rijndael.EncryptECB(InData,Block)
or
DCP_rijndael.EncryptCBC(InData,Block,Sizeof(Block));
Mainly I am amazed that you can call functions with dynamic arrays and normal arrays on the same way.
Do you have any idea?
Thank you very much for helping