Fix segfault caused by wrong wgettext()
authorsfan5 <sfan5@live.de>
Mon, 9 Apr 2018 14:25:57 +0000 (16:25 +0200)
committerGitHub <noreply@github.com>
Mon, 9 Apr 2018 14:25:57 +0000 (16:25 +0200)
src/gettext.h

index 4038e3fa857476889fc4d053742b12680975a3a5..42b375d869c2b6f1d246b5a09532aa1b3f79c496 100644 (file)
@@ -52,7 +52,7 @@ extern wchar_t *utf8_to_wide_c(const char *str);
 inline const wchar_t *wgettext(const char *str)
 {
        // We must check here that is not an empty string to avoid trying to translate it
-       return str[0] ? utf8_to_wide_c(gettext(str)) : L"";
+       return str[0] ? utf8_to_wide_c(gettext(str)) : utf8_to_wide_c("");
 }
 
 inline std::string strgettext(const std::string &text)