fixed issue causing segfault on ARM systems
authorAidan <torrinfail@gmail.com>
Sat, 30 Nov 2019 09:05:10 +0000 (02:05 -0700)
committerAidan <torrinfail@gmail.com>
Sat, 30 Nov 2019 09:05:10 +0000 (02:05 -0700)
dwmblocks.c

index 395b565..f7f23cc 100644 (file)
@@ -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';