mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 18:01:29 +00:00
Fix config.c strlen error
This commit is contained in:
parent
a7710c5537
commit
bffbe11e53
|
@ -142,7 +142,7 @@ static char *get_config_path(void) {
|
|||
|
||||
if (!getenv("XDG_CONFIG_HOME")) {
|
||||
char *home = getenv("HOME");
|
||||
char *config_home = malloc(strlen("home") + strlen("/.config") + 1);
|
||||
char *config_home = malloc(strlen(home) + strlen("/.config") + 1);
|
||||
strcpy(config_home, home);
|
||||
strcat(config_home, "/.config");
|
||||
setenv("XDG_CONFIG_HOME", config_home, 1);
|
||||
|
|
Loading…
Reference in a new issue