projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a06d6a
)
Fix segfault caused by wrong wgettext()
author
sfan5
<sfan5@live.de>
Mon, 9 Apr 2018 14:25:57 +0000
(16:25 +0200)
committer
GitHub
<noreply@github.com>
Mon, 9 Apr 2018 14:25:57 +0000
(16:25 +0200)
src/gettext.h
patch
|
blob
|
history
diff --git
a/src/gettext.h
b/src/gettext.h
index 4038e3fa857476889fc4d053742b12680975a3a5..42b375d869c2b6f1d246b5a09532aa1b3f79c496 100644
(file)
--- 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)