瀏覽代碼

* Fixed TComparerService.LookupComparer.

git-svn-id: trunk@45855 -
yury 5 年之前
父節點
當前提交
cbe38d7664
共有 1 個文件被更改,包括 3 次插入2 次删除
  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
   else
   begin
   begin
     LInstance := @ComparerInstances[ATypeInfo.Kind];
     LInstance := @ComparerInstances[ATypeInfo.Kind];
-    Result := LInstance.Instance;
     if LInstance.Selector then
     if LInstance.Selector then
-      Result := TSelectFunc(Result)(GetTypeData(ATypeInfo), ASize);
+      Result := TSelectFunc(LInstance.SelectorInstance)(GetTypeData(ATypeInfo), ASize)
+    else
+      Result := LInstance.Instance;
   end;
   end;
 end;
 end;