diff --git a/format.c b/format.c index e5f9d28c..d6bcfc08 100644 --- a/format.c +++ b/format.c @@ -336,7 +336,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);