From 09a00ab345f1c1c4bce5496f7c7d054476e35392 Mon Sep 17 00:00:00 2001 From: Aidan Date: Sat, 30 Nov 2019 02:05:10 -0700 Subject: fixed issue causing segfault on ARM systems --- dwmblocks.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dwmblocks.c') 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'; -- cgit v1.2.3-13-gbd6f