summaryrefslogtreecommitdiff
path: root/src/gettext.cpp
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2015-03-31 21:26:34 +1000
committerCraig Robbins <kde.psych@gmail.com>2015-03-31 21:26:34 +1000
commitd1d5618bb829127d8e138f354bf5a4f23852df59 (patch)
tree921452ba2edaccd32bbac5eb635a446954064355 /src/gettext.cpp
parent1fe4256462826c218ed9bf171be4c07e0db33e25 (diff)
downloadminetest-d1d5618bb829127d8e138f354bf5a4f23852df59.tar.gz
minetest-d1d5618bb829127d8e138f354bf5a4f23852df59.tar.bz2
minetest-d1d5618bb829127d8e138f354bf5a4f23852df59.zip
Fix use of unitialized variable in gettext.cpp
#2583
Diffstat (limited to 'src/gettext.cpp')
-rw-r--r--src/gettext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gettext.cpp b/src/gettext.cpp
index 20453b914..509d506d4 100644
--- a/src/gettext.cpp
+++ b/src/gettext.cpp
@@ -236,9 +236,9 @@ void init_gettext(const char *path, const std::string &configured_language) {
#endif
#endif
- static const char *name = lowercase(PROJECT_NAME).c_str();
- bindtextdomain(name, path);
- textdomain(name);
+ static std::string name = lowercase(PROJECT_NAME);
+ bindtextdomain(name.c_str(), path);
+ textdomain(name.c_str());
#if defined(_WIN32)
// Set character encoding for Win32