xbps-checkvers: try to not see something like ${var##foo} as comment

This commit is contained in:
Duncaen 2019-06-13 21:41:16 +02:00 committed by Duncan Overbruck
parent 204b9b630a
commit 0691054a59

View File

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