]> git.tue.mpg.de Git - adu.git/commitdiff
format.c: Return an empty buffer for empty format strings rather than NULL.
authorAndre Noll <maan@systemlinux.org>
Sun, 9 Nov 2008 19:30:08 +0000 (20:30 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 9 Nov 2008 19:30:08 +0000 (20:30 +0100)
format.c

index 37bb087ba02fff7f472d14b0739e715626263c26..02edf37aaf15f27154fd1cefbb7c02515f7b3ba2 100644 (file)
--- a/format.c
+++ b/format.c
@@ -457,5 +457,7 @@ char *format_items(struct format_info *info, union atom_value *values)
                buf = adu_strcat(buf, val);
                free(val);
        }
+       if (!buf)
+               buf = adu_strdup("");
        return buf;
 }