diff options
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | windows.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -281,7 +281,7 @@ static void setup_system_prefs(void) const char *env; default_prefs.divelist_font = strdup(system_divelist_default_font); - default_prefs.default_filename = strdup(system_default_filename()); + default_prefs.default_filename = system_default_filename(); env = getenv("LC_MEASUREMENT"); if (!env) @@ -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"; } |