From 0691054a59703dd34750516d05326413c4bb4b5e Mon Sep 17 00:00:00 2001 From: Duncaen Date: Thu, 13 Jun 2019 21:41:16 +0200 Subject: [PATCH] xbps-checkvers: try to not see something like ${var##foo} as comment --- bin/xbps-checkvers/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/xbps-checkvers/main.c b/bin/xbps-checkvers/main.c index 26e7c30e..1ce21e64 100644 --- a/bin/xbps-checkvers/main.c +++ b/bin/xbps-checkvers/main.c @@ -509,7 +509,7 @@ rcv_get_pkgver(rcv_t *rcv) vlen--; } comment = strchr(v, '#'); - if (comment && comment < p) { + if (comment && comment < p && (comment > v && comment[-1] == ' ')) { while (v[vlen-1] != '#') { vlen--; }