Explorar o código

Libraries: generics.collections fix

Herman Schoenfeld %!s(int64=7) %!d(string=hai) anos
pai
achega
b1b263d6f1

+ 3 - 0
src/libraries/generics.collections/generics.collections.pas

@@ -2875,12 +2875,15 @@ begin
     Result := Compare(ANode.Key,AInsertNode.Key);
     if Result < 0 then
     begin
+      Result:=-1;
       if AInsertNode.Left = nil then
         Exit;
       AInsertNode := AInsertNode.Left;
     end
     else
     begin
+      if Result > 0 then
+        Result:=1;
       if AInsertNode.Right = nil then
         Exit;
       AInsertNode := AInsertNode.Right;