mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-04 13:07:40 +01:00
avl_tree: fixed FindPointer if on last node
git-svn-id: trunk@19728 -
This commit is contained in:
parent
8dc6ebb5ed
commit
9d30bf6a9f
@ -791,7 +791,8 @@ begin
|
||||
while (Result<>nil) do begin
|
||||
if Result.Data=Data then break;
|
||||
Result:=FindSuccessor(Result);
|
||||
if fOnCompare(Data,Result.Data)<>0 then Result:=nil;
|
||||
if Result=nil then exit;
|
||||
if fOnCompare(Data,Result.Data)<>0 then exit(nil);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user