summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {