From 962a5e96b7c26217cde16b5b7903090eba3189fe Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 7 Sep 2023 19:38:01 +0800 Subject: [PATCH] cli: fix --modversion not showing version with versioned query Fixes #317. Signed-off-by: Xi Ruoyao --- cli/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/main.c b/cli/main.c index 76cd9c2..5202a93 100644 --- a/cli/main.c +++ b/cli/main.c @@ -306,7 +306,7 @@ apply_modversion(pkgconf_client_t *client, pkgconf_pkg_t *world, void *data, int pkgconf_dependency_t *dep = world_iter->data; pkgconf_pkg_t *pkg = dep->match; - if (strcmp(pkg->why, queue_node->package)) + if (strncmp(pkg->why, queue_node->package, strlen(pkg->why))) continue; if (pkg->version != NULL) {