Commit: b2ee5d2e1cd45f0de824e032a2a8dc01592a41aa Parent: b68280d6efa621a340cc06cd581a55ebbf914504 Author: Randy Palamar Date: Mon, 16 Oct 2023 05:56:57 -0600 mpd: avoid printing when block is empty Diffstat:
M | blocks/mpd.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blocks/mpd.c b/blocks/mpd.c @@ -71,5 +71,5 @@ mpd_tag(struct Block *b) mpd_send_idle(conn); - return snprintf(b->curstr, LEN(b->curstr), b->fmt, str); + return len? snprintf(b->curstr, LEN(b->curstr), b->fmt, str) : 0; }