summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-24 07:27:28 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-24 07:27:28 -0700
commit945812b98ab6e9b6704c55b1f1ea715c577b1b05 (patch)
tree73b525875b528a28eced43261bb781ebfe8a870a
parentb489c675c3280c6c920910bd543b5fb25f94854b (diff)
Filter empty strings from query terms.
-rw-r--r--MobileCydia.mm7
1 files changed, 6 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 8c01c67..6008a27 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -7979,7 +7979,12 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
}
- (NSArray *) termsForQuery:(NSString *)query {
- return [query componentsSeparatedByString:@" "];
+ NSMutableArray *terms([NSMutableArray arrayWithCapacity:2]);
+ for (NSString *component in [query componentsSeparatedByString:@" "])
+ if ([component length] != 0)
+ [terms addObject:component];
+
+ return terms;
}
- (void) useSearch {