summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2016-10-25 15:08:18 +0300
committerPanu Matilainen <pmatilai@redhat.com>2017-10-26 10:40:47 +0300
commitdaaef890f8fa0d2e20f72eb068505d64902e9de4 (patch)
treeb177d490724fdf643448254c039dcba808928e50
parente21b8a92f8736efb1c052a3b04337764d7fca41e (diff)
downloadrpm-daaef890f8fa0d2e20f72eb068505d64902e9de4.tar.gz
Fix expandFormat() to work with all string types
Use the proper rpmtdGetString() accessor function which knows how to deal with array types too. (cherry picked from commit e9e637e2559926ef0d4aa3f7cf686d1944e1d036)
-rw-r--r--lib/formats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/formats.c b/lib/formats.c
index bad0b2de6..c0427a616 100644
--- a/lib/formats.c
+++ b/lib/formats.c
@@ -568,7 +568,7 @@ static char * expandFormat(rpmtd td)
if (rpmtdClass(td) != RPM_STRING_CLASS) {
val = xstrdup(_("(not a string)"));
} else {
- val = rpmExpand(td->data, NULL);
+ val = rpmExpand(rpmtdGetString(td), NULL);
}
return val;
}