summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-02-28 23:33:07 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-07 02:41:32 -0800
commitdf289c5a6821b24dd87d20b690c5c15fcd83c3d6 (patch)
tree3912a60f4701615f79efc5140600e89a6b7c6639
parent4bcafc016a94c555e6a91a1c50c35b201d389e66 (diff)
Work around vendors who are abusing shortDescription.
-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;