mirror of
https://github.com/minetest/minetest.git
synced 2024-12-02 04:23:45 +01:00
Fix segfault caused by wrong wgettext()
This commit is contained in:
parent
1d06a8ef6c
commit
a6cfe73cb0
@ -52,7 +52,7 @@ extern wchar_t *utf8_to_wide_c(const char *str);
|
|||||||
inline const wchar_t *wgettext(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
|
// 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)
|
inline std::string strgettext(const std::string &text)
|
||||||
|
Loading…
Reference in New Issue
Block a user