Skip to content

Commit

Permalink
Fix segfault caused by wrong wgettext()
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 authored Apr 9, 2018
1 parent 9a06d6a commit 22ebbe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gettext.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 22ebbe1

Please sign in to comment.