diff options
author | torrinfail <torrinfail@gmail.com> | 2022-01-06 19:45:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-06 19:45:08 -0700 |
commit | ba866be168ec676c7361360957c20ed9cef9e737 (patch) | |
tree | 613a9422fd77d889ea8b275ce29c261cf0185fd6 | |
parent | 96cbb453e5373c05372fd4bf3faacfa53e409067 (diff) | |
parent | f47a157e57c81b27bd3f04eed422ca068b70b7a3 (diff) |
Merge pull request #59 from mehmetumit/master
\0 delimeter issue fixed
This was clearly just an oversight. Thanks for the fix!
-rw-r--r-- | dwmblocks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dwmblocks.c b/dwmblocks.c index ded717c..befd252 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -70,9 +70,9 @@ void getcmd(const Block *block, char *output) pclose(cmdf); return; } + //only chop off newline if one is present at the end + i = output[i-1] == '\n' ? i-1 : i; if (delim[0] != '\0') { - //only chop off newline if one is present at the end - i = output[i-1] == '\n' ? i-1 : i; strncpy(output+i, delim, delimLen); } else |