mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-03 02:39:22 +02:00
SynEdit: Fix to TSynFilteredMethodList.IndexOf (could return wrong index)
git-svn-id: trunk@27812 -
This commit is contained in:
parent
c804b045c2
commit
421f4f7909
@ -1534,8 +1534,8 @@ function TSynFilteredMethodList.IndexOf(AHandler: TMethod): Integer;
|
||||
begin
|
||||
Result := FCount - 1;
|
||||
while (Result >= 0) and
|
||||
(FItems[Result].FHandler.Code <> AHandler.Code) and
|
||||
(FItems[Result].FHandler.Data <> AHandler.Data)
|
||||
( (FItems[Result].FHandler.Code <> AHandler.Code) or
|
||||
(FItems[Result].FHandler.Data <> AHandler.Data) )
|
||||
do
|
||||
dec(Result);
|
||||
end;
|
||||
@ -1543,10 +1543,10 @@ end;
|
||||
function TSynFilteredMethodList.IndexOf(AHandler: TMethod; AFilter: LongInt): Integer;
|
||||
begin
|
||||
Result := FCount - 1;
|
||||
while (Result >= 0) and
|
||||
(FItems[Result].FHandler.Code <> AHandler.Code) and
|
||||
(FItems[Result].FHandler.Data <> AHandler.Data) and
|
||||
(FItems[Result].FFilter <> AFilter)
|
||||
while (Result >= 0) and (
|
||||
(FItems[Result].FHandler.Code <> AHandler.Code) or
|
||||
(FItems[Result].FHandler.Data <> AHandler.Data) or
|
||||
(FItems[Result].FFilter <> AFilter) )
|
||||
do
|
||||
dec(Result);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user