aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 02889b0..0f514f3 100644
--- a/src/config.c
+++ b/src/config.c
@@ -18,7 +18,6 @@ static void getXDGDir(const char* envvar, const char* homeext, char* config, con
else
{
char* home = getenv("HOME");
- if (!home) home = "";
if (!home)
{
#ifdef _WIN32
@@ -27,6 +26,7 @@ static void getXDGDir(const char* envvar, const char* homeext, char* config, con
#endif
home = "";
}
+ if (!home) home = "";
strncpy(config, home, size);
strncat(config, homeext, size - strlen(config));
}