diff --git a/menu.c b/menu.c index 7468139..694d457 100644 --- a/menu.c +++ b/menu.c @@ -601,7 +601,7 @@ menuq_add(struct menu_q *mq, void *ctx, const char *fmt, ...) mi->ctx = ctx; va_start(ap, fmt); - (void)vsnprintf(mi->text, sizeof(mi->text), fmt, ap); + (void)vsnprintf(mi->text, sizeof(mi->text), fmt ? fmt : "", ap); va_end(ap); TAILQ_INSERT_TAIL(mq, mi, entry);