mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
cvsimport
* refs/heads/master: If supplied format to menuq_add() is NULL, fill text with an empty string; found by Christian Neukirchen.
This commit is contained in:
commit
bbbaacf177
5
menu.c
5
menu.c
@ -601,7 +601,10 @@ 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 ? fmt : "", ap);
|
||||
if (fmt != NULL)
|
||||
(void)vsnprintf(mi->text, sizeof(mi->text), fmt, ap);
|
||||
else
|
||||
mi->text[0] = '\0';
|
||||
va_end(ap);
|
||||
|
||||
TAILQ_INSERT_TAIL(mq, mi, entry);
|
||||
|
Loading…
Reference in New Issue
Block a user