X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=blobdiff_plain;f=libi3%2Fresolve_tilde.c;fp=libi3%2Fresolve_tilde.c;h=6dbf132fa7605d59e3c7f96c4ce7ae2c57e0e51f;hp=51d642db37ec37f3f1dc014f44d51b31dd324390;hb=1847938d4eeba98260cc79ca45a11a134274c2ea;hpb=c54f5008395b10c046f380cc3069ff779e5d2877 diff --git a/libi3/resolve_tilde.c b/libi3/resolve_tilde.c index 51d642db..6dbf132f 100644 --- a/libi3/resolve_tilde.c +++ b/libi3/resolve_tilde.c @@ -35,9 +35,10 @@ char *resolve_tilde(const char *path) { } else { head = globbuf.gl_pathv[0]; result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1, 1); - strncpy(result, head, strlen(head)); - if (tail) - strncat(result, tail, strlen(tail)); + strcpy(result, head); + if (tail) { + strcat(result, tail); + } } globfree(&globbuf);