From 076d8ebd5c533315d3b749534796409e57abb562 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Yadav Date: Wed, 22 Jul 2020 21:13:23 +0530 Subject: [PATCH] Removed a bug in updatestatus --- dwmblocks.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dwmblocks.c b/dwmblocks.c index 3bdd4fd..9ea62cb 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -220,6 +220,8 @@ updatestatus() str += i; if (current->pathc && current->signal) str++; + if (*str == '\0') + goto update2; str += delimlength; } return 1; @@ -238,6 +240,7 @@ update1: } while (NOTATCMDOUTEND(current, i)); if (current->pathc && current->signal) *(str++) = current->signal; +update2: for (i = 0; delim[i]; i++) *(str++) = delim[i]; *(str++) = '\n';