summaryrefslogtreecommitdiff
path: root/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon.c')
-rw-r--r--daemon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon.c b/daemon.c
index 0f25181..88f29e1 100644
--- a/daemon.c
+++ b/daemon.c
@@ -29,12 +29,13 @@ static char **parse_args(char *buf, int len)
while (len) {
addv(&args, buf);
- char *p = memchr(buf, '\0', len);
+ char *p = memchr(buf, ' ', len);
if (!p)
break;
len -= p - buf + 1;
buf = p + 1;
+ *p = '\0';
}
return args;