From 945812b98ab6e9b6704c55b1f1ea715c577b1b05 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 24 Mar 2011 07:27:28 -0700 Subject: Filter empty strings from query terms. --- MobileCydia.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 { -- cgit v1.2.3