summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 4a5ba98c..00c29799 100644
--- a/src/util.c
+++ b/src/util.c
@@ -107,12 +107,12 @@ jv get_home() {
#else
home = getenv("USERPROFILE");
if (!home) {
- char *hd = getenv("HOMEDRIVE");
- if (!hd) hd = "";
home = getenv("HOMEPATH");
if (!home) {
ret = jv_invalid_with_msg(jv_string("Could not find home directory."));
} else {
+ const char *hd = getenv("HOMEDRIVE");
+ if (!hd) hd = "";
ret = jv_string_fmt("%s%s",hd,home);
}
} else {