From: Andre Noll Date: Sun, 9 Nov 2008 19:30:08 +0000 (+0100) Subject: format.c: Return an empty buffer for empty format strings rather than NULL. X-Git-Tag: v0.0.5~1^2~9 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;ds=inline;h=06ed2a8ccb7f05eacb530a34f222a1d900f35bf5;hp=e23b8a9551b07e7fa289f8fbac047565e88a8c04;p=adu.git format.c: Return an empty buffer for empty format strings rather than NULL. --- diff --git a/format.c b/format.c index 37bb087..02edf37 100644 --- 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; }