Explorar o código

* Exit find if not sorted (bug id 28774)

git-svn-id: trunk@31941 -
michael %!s(int64=10) %!d(string=hai) anos
pai
achega
aa3a7b7eb8
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      rtl/objpas/classes/stringl.inc

+ 2 - 0
rtl/objpas/classes/stringl.inc

@@ -1390,6 +1390,8 @@ var
   CompareRes: PtrInt;
 begin
   Result := false;
+  if Not Sorted then 
+    exit;
   // Use binary search.
   L := 0;
   R := Count - 1;