Browse Source

* Fixed TComparerService.LookupComparer.

git-svn-id: trunk@45855 -
yury 5 years ago
parent
commit
cbe38d7664
1 changed files with 3 additions and 2 deletions
  1. 3 2
      packages/rtl-generics/src/generics.defaults.pas

+ 3 - 2
packages/rtl-generics/src/generics.defaults.pas

@@ -2167,9 +2167,10 @@ begin
   else
   begin
     LInstance := @ComparerInstances[ATypeInfo.Kind];
-    Result := LInstance.Instance;
     if LInstance.Selector then
-      Result := TSelectFunc(Result)(GetTypeData(ATypeInfo), ASize);
+      Result := TSelectFunc(LInstance.SelectorInstance)(GetTypeData(ATypeInfo), ASize)
+    else
+      Result := LInstance.Instance;
   end;
 end;