summaryrefslogtreecommitdiffstats
path: root/windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'windows.c')
-rw-r--r--windows.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/windows.c b/windows.c
index 9087c9e4e..3db08deab 100644
--- a/windows.c
+++ b/windows.c
@@ -232,8 +232,10 @@ const char *subsurface_gettext_domainpath(char *argv0)
/* first hackishly make sure that the LANGUAGE information is correctly set up
* in the environment */
char buffer[80];
- snprintf(buffer, sizeof(buffer), "LANGUAGE=%s.UTF-8", g_win32_getlocale());
+ gchar *locale = g_win32_getlocale();
+ snprintf(buffer, sizeof(buffer), "LANGUAGE=%s.UTF-8", locale);
putenv(buffer);
+ g_free(locale);
/* always use translation directory relative to install location, regardless of argv0 */
return "./share/locale";
}