]> git.sur5r.net Git - i3/i3/blobdiff - libi3/resolve_tilde.c
Merge pull request #3421 from Streetwalrus/iconic-state
[i3/i3] / libi3 / resolve_tilde.c
index 26cbabe5f1679cd38ff4f7ac88f220cca2fb7c26..51d642db37ec37f3f1dc014f44d51b31dd324390 100644 (file)
@@ -5,8 +5,8 @@
  * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
  *
  */
-
 #include "libi3.h"
+
 #include <err.h>
 #include <glob.h>
 #include <stdlib.h>
@@ -34,7 +34,7 @@ char *resolve_tilde(const char *path) {
         err(EXIT_FAILURE, "glob() failed");
     } else {
         head = globbuf.gl_pathv[0];
-        result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1);
+        result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1, 1);
         strncpy(result, head, strlen(head));
         if (tail)
             strncat(result, tail, strlen(tail));