summaryrefslogtreecommitdiff
path: root/lib/formats.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/formats.c')
-rw-r--r--lib/formats.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/formats.c b/lib/formats.c
index c0427a616..f1fb8717b 100644
--- a/lib/formats.c
+++ b/lib/formats.c
@@ -150,7 +150,7 @@ static char * shescapeFormat(rpmtd td)
if (rpmtdClass(td) == RPM_NUMERIC_CLASS) {
rasprintf(&result, "%" PRIu64, rpmtdGetNumber(td));
- } else {
+ } else if (rpmtdClass(td) == RPM_STRING_CLASS) {
char *buf = xstrdup(rpmtdGetString(td));;
result = dst = xmalloc(strlen(buf) * 4 + 3);
@@ -168,6 +168,8 @@ static char * shescapeFormat(rpmtd td)
*dst++ = '\'';
*dst = '\0';
free(buf);
+ } else {
+ result = xstrdup(_("(invalid type)"));
}
return result;