From: sfan5 Date: Mon, 9 Apr 2018 14:25:57 +0000 (+0200) Subject: Fix segfault caused by wrong wgettext() X-Git-Tag: 0.4.17~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a6cfe73cb057001f214bd8c6cebc3d699dba16b7;p=oweals%2Fminetest.git Fix segfault caused by wrong wgettext() --- diff --git a/src/gettext.h b/src/gettext.h index 170d75dee..9aa6b3a27 100644 --- a/src/gettext.h +++ b/src/gettext.h @@ -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)