summaryrefslogtreecommitdiff
path: root/dwmblocks.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwmblocks.c')
-rw-r--r--dwmblocks.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dwmblocks.c b/dwmblocks.c
index 395b565..f7f23cc 100644
--- a/dwmblocks.c
+++ b/dwmblocks.c
@@ -54,7 +54,11 @@ void getcmd(const Block *block, char *output)
char c;
int i = strlen(block->icon);
while((c = fgetc(cmdf)) != EOF)
+ {
output[i++] = c;
+ if(c == '\n')
+ break;
+ }
if (delim != '\0' && --i)
output[i++] = delim;
output[i++] = '\0';