#1 2020-03-12 20:23:46

Márcio Baroni
Member
From: Brasil
Registered: 2015-10-07
Posts: 29

Access violation on TRawUTF8List.Contains

@ab, I found an Access violation in the Contains function of the TRawUTF8List class

function TRawUTF8List.Contains(const aText: RawUTF8; aFirstIndex: integer): PtrInt;
var i: PtrInt; // use a temp variable to make oldest Delphi happy :(
begin
  result := -1;
  if self<>nil then begin
    fSafe.Lock;
    try
      for i := aFirstIndex to fCount-1 do
        if PosEx(aText,fValue[result])>0 then begin   <<---- the correct would be the variable "i" instead of "result"
          result := i;
          exit;
        end;
    finally
      fSafe.UnLock;
    end;
  end;
end;

Offline

#2 2020-03-12 20:51:07

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,316
Website

Re: Access violation on TRawUTF8List.Contains

Should be fixed now.
As part of https://synopse.info/fossil/info/56f226240df88162

Sorry for the problem!

Offline

Board footer

Powered by FluxBB