search: fix swapped needle and haystack

cute-signatures
Bobby Bingham 2015-06-10 08:08:56 +03:00 committed by Timo Teräs
parent c088f2a692
commit e01b29e2fa
1 changed files with 2 additions and 2 deletions

View File

@ -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;