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:
1d06a8e
)
Fix segfault caused by wrong wgettext()
author
sfan5
<sfan5@live.de>
Mon, 9 Apr 2018 14:25:57 +0000
(16:25 +0200)
committer
SmallJoker
<mk939@ymail.com>
Sun, 3 Jun 2018 15:32:00 +0000
(17:32 +0200)
src/gettext.h
patch
|
blob
|
history
diff --git
a/src/gettext.h
b/src/gettext.h
index 170d75dee631464d72b8cc9f7146a81c55d11d04..9aa6b3a27c28906250206f28bf3075536be7b337 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)