From e01b29e2fa2135b4a9ba754956b7ad395534dad1 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Wed, 10 Jun 2015 08:08:56 +0300 Subject: search: fix swapped needle and haystack --- src/search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/search.c b/src/search.c index 47339fd..5833325 100644 --- a/src/search.c +++ b/src/search.c @@ -122,8 +122,8 @@ static void print_result_pkg(struct search_ctx *ctx, struct apk_package *pkg) if (ctx->search_description) { foreach_array_item(pmatch, ctx->filter) { - if (strstr(*pmatch, pkg->description) != NULL || - strstr(*pmatch, pkg->name->name) != NULL) + if (strstr(pkg->description, *pmatch) != NULL || + strstr(pkg->name->name, *pmatch) != NULL) goto match; } return; -- cgit v1.2.3