diff options
Diffstat (limited to 'osdep/getch2.c')
-rw-r--r-- | osdep/getch2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/getch2.c b/osdep/getch2.c index 3b680acd7f..4aa09323eb 100644 --- a/osdep/getch2.c +++ b/osdep/getch2.c @@ -298,7 +298,7 @@ char* get_term_charset(void) char* charset = NULL; #ifdef HAVE_LANGINFO setlocale(LC_CTYPE, ""); - charset = nl_langinfo(CODESET); + charset = strdup(nl_langinfo(CODESET)); setlocale(LC_CTYPE, "C"); #endif return charset; |