commit: 85f7604d713d1c7fce3ea31798faee4487a90dc7
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 5 12:43:59 2018 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Apr 5 12:43:59 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=85f7604d
atom_explode: properly set fields for no-version case
atom_explode/basic test wasn't run due to no dependencies in Makefile,
hence I didn't see this before
libq/atom_explode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libq/atom_explode.c b/libq/atom_explode.c
index e52f149..faf24ff 100644
--- a/libq/atom_explode.c
+++ b/libq/atom_explode.c
@@ -200,6 +200,8 @@ atom_explode(const char *atom)
if (ptr == NULL) {
/* atom has no version, this is it */
+ strcpy(ret->P, ret->PN);
+ ret->PVR = NULL;
return ret;
}
ret->PV = ptr;