Closed Alexey-T closed 2 years ago
How FPC implements Sorted
: it calls SortStyle:= sslAuto
. then:
procedure TStringList.SetSortStyle(AValue: TStringsSortStyle);
begin
if FSortStyle=AValue then Exit;
if (AValue=sslAuto) then
Sort;
FSortStyle:=AValue;
end;
Fix is:
change FHTMLTagList.Sort;
to FHTMLTagList.Sorted := True;
I pass
Sorted
stringlist. then you do:Sorted
is reset, then Find method gives the exception. FPC 3.2.3.