Fixed for loop in getstatus()
authorAidan <torrinfail@gmail.com>
Mon, 25 Mar 2019 04:32:08 +0000 (22:32 -0600)
committerAidan <torrinfail@gmail.com>
Mon, 25 Mar 2019 04:32:08 +0000 (22:32 -0600)
dwmblocks.c

index 5569531..88ee952 100644 (file)
@@ -95,7 +95,7 @@ void setupsignals()
 void getstatus(char *str)
 {
        int j = 0;
-       for(int i = 0; i < 5; j+=strlen(statusbar[i++]))
+       for(int i = 0; i < LENGTH(blocks); j+=strlen(statusbar[i++]))
        {       
                strcpy(str + j, statusbar[i]);
        }