summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i3status.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/i3status.c b/i3status.c
index 76cb280..b83b1f3 100644
--- a/i3status.c
+++ b/i3status.c
@@ -227,9 +227,10 @@ static char *resolve_tilde(const char *path) {
} else {
head = globbuf.gl_pathv[0];
result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1);
- strncpy(result, head, strlen(head));
- if (tail)
- strncat(result, tail, strlen(tail));
+ strcpy(result, head);
+ if (tail) {
+ strcat(result, tail);
+ }
}
globfree(&globbuf);