aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <ddevault@linode.com>2015-12-11 14:22:28 -0500
committerLibravatar Drew DeVault <ddevault@linode.com>2015-12-11 14:22:28 -0500
commitbffbe11e530fa37f2421e94463bc2ec4516ba394 (patch)
tree0fcfdb9783d3054bed1ee38530eca625f76516a4
parentInitialize keyboard in registry poll (diff)
downloadsway-bffbe11e530fa37f2421e94463bc2ec4516ba394.tar.gz
sway-bffbe11e530fa37f2421e94463bc2ec4516ba394.tar.zst
sway-bffbe11e530fa37f2421e94463bc2ec4516ba394.zip
Fix config.c strlen error
-rw-r--r--sway/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c
index 6a1d172b..7e3c3149 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -142,7 +142,7 @@ static char *get_config_path(void) {
142 142
143 if (!getenv("XDG_CONFIG_HOME")) { 143 if (!getenv("XDG_CONFIG_HOME")) {
144 char *home = getenv("HOME"); 144 char *home = getenv("HOME");
145 char *config_home = malloc(strlen("home") + strlen("/.config") + 1); 145 char *config_home = malloc(strlen(home) + strlen("/.config") + 1);
146 strcpy(config_home, home); 146 strcpy(config_home, home);
147 strcat(config_home, "/.config"); 147 strcat(config_home, "/.config");
148 setenv("XDG_CONFIG_HOME", config_home, 1); 148 setenv("XDG_CONFIG_HOME", config_home, 1);