summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 132c31e..9ef5db9 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -3014,7 +3014,10 @@ struct PackageNameOrdering :
[self parse];
- range = [[self shortDescription] rangeOfString:text options:MatchCompareOptions_];
+ NSString *description([self shortDescription]);
+ NSUInteger length([description length]);
+
+ range = [[self shortDescription] rangeOfString:text options:MatchCompareOptions_ range:NSMakeRange(0, std::min<NSUInteger>(length, 100))];
if (range.location != NSNotFound)
return YES;