summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2015-06-10 08:08:56 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-06-10 08:08:56 +0300
commite01b29e2fa2135b4a9ba754956b7ad395534dad1 (patch)
tree9be57b7012712be6e9fe300938a4e9d40955f51b /src/search.c
parentc088f2a69205870a507204caded32b80f205bc23 (diff)
downloadapk-tools-e01b29e2fa2135b4a9ba754956b7ad395534dad1.tar.gz
apk-tools-e01b29e2fa2135b4a9ba754956b7ad395534dad1.tar.bz2
apk-tools-e01b29e2fa2135b4a9ba754956b7ad395534dad1.tar.xz
apk-tools-e01b29e2fa2135b4a9ba754956b7ad395534dad1.zip
search: fix swapped needle and haystack
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c4
1 files 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;