You are not logged in.
Pages: 1
Hi,
If I add empty string to array,
sorting the array causes AV.
rev 1.18.4885
procedure foo;
var Ar: TStringDynArray;
s: String;
AK: TDynArray;
begin
AK.Init(TypeInfo(TStringDynArray),Ar);
s := 'a';
AK.Add(s);
s := '';
AK.Add(s);
AK.Sort(SortDynArrayString);
end;
Offline
It is due to a bug in Delphi 2009+ RTL's SysUtils.StrComp() function.
The bug doesn't exist with FPC or e.g. Delphi 7/2007.
See https://synopse.info/fossil/info/263e2e02fb
Thanks for the report!
Offline
Pages: 1