Permit simple strings to be returned argv-style from headers too
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 24 Feb 2010 07:42:11 +0000 (09:42 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 24 Feb 2010 14:38:09 +0000 (16:38 +0200)
lib/header.c

index 2cd5dd3..1aa451b 100644 (file)
@@ -1142,7 +1142,8 @@ static int copyTdEntry(const indexEntry entry, rpmtd td, headerGetFlags flags)
        }
        break;
     case RPM_STRING_TYPE:
-       if (count == 1) {
+       /* simple string, but fallthrough if its actually an array */
+       if (count == 1 && !argvArray) {
            td->data = allocMem ? xstrdup(entry->data) : entry->data;
            break;
        }