Fix config.c strlen error

This commit is contained in:
Drew DeVault 2015-12-11 14:22:28 -05:00
parent a7710c5537
commit bffbe11e53
1 changed files with 1 additions and 1 deletions

View File

@ -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);