1
0
mirror of https://github.com/tmux/tmux.git synced 2025-04-09 10:28:49 +00:00

Return empty string if format is empty rather than attempting to

allocate zero bytes.
This commit is contained in:
nicm 2015-05-20 06:39:02 +00:00
parent 2c53b23d59
commit 7140cce7f3

View File

@ -335,7 +335,7 @@ format_expand_time(struct format_tree *ft, const char *fmt, time_t t)
size_t tmplen;
struct tm *tm;
if (fmt == NULL)
if (fmt == NULL || *fmt == '\0')
return (xstrdup(""));
tm = localtime(&t);