pinosaur
/
dwmblocks.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
500b1fb
d581dae
)
Merge pull request #29 from keikari/patch-2
author
torrinfail
<torrinfail@gmail.com>
Thu, 27 Aug 2020 06:51:30 +0000
(06:51 +0000)
committer
GitHub
<noreply@github.com>
Thu, 27 Aug 2020 06:51:30 +0000
(06:51 +0000)
Fix, delimLen caused weird behaviour
1
2
dwmblocks.c
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
dwmblocks.c
index
b6f696f
,
2014eee
..
e3e34a1
---
1
/
dwmblocks.c
---
2
/
dwmblocks.c
+++ b/
dwmblocks.c
@@@
-175,10
-175,11
+175,11
@@@
int main(int argc, char** argv
{
if (!strcmp("-d",argv[i]))
strncpy(delim, argv[++i], delimLen);
- else if(!strcmp("-p",argv[i]))
+ else if
(!strcmp("-p",argv[i]))
writestatus = pstdout;
}
- delim[MIN(delimLen, strlen(delim))] = '\0';
+ delimLen = MIN(delimLen, strlen(delim));
+ delim[delimLen++] = '\0';
signal(SIGTERM, termhandler);
signal(SIGINT, termhandler);
statusloop();