From ba5b451dd0c3f08e92f5960a7dad1deed77317f7 Mon Sep 17 00:00:00 2001
From: Syed Amer Gilani <Syed.Amer@Gilani.eu>
Date: Wed, 19 Aug 2015 12:51:11 +0200
Subject: [PATCH] fixed string building for XDG_CONFIG_HOME config loading

---
 sway/config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sway/config.c b/sway/config.c
index be9f70c19..13280f9da 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -41,7 +41,7 @@ static char *get_config_path() {
 	} else {
 		name = "/sway/config";
 		temp = malloc(strlen(xdg_config_home) + strlen(name) + 1);
-		strcpy(xdg_config_home, home);
+		strcpy(temp, xdg_config_home);
 		strcat(temp, name);
 	}
 	if (exists(temp)) {
@@ -94,7 +94,7 @@ static char *get_config_path() {
 	} else {
 		name = "/i3/config";
 		temp = malloc(strlen(xdg_config_home) + strlen(name) + 1);
-		strcpy(xdg_config_home, home);
+		strcpy(temp, xdg_config_home);
 		strcat(temp, name);
 	}
 	if (exists(temp)) {