aboutsummaryrefslogtreecommitdiff
path: root/src/guiMessageMenu.cpp
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-04-07 19:15:17 +0200
committerkwolekr <kwolekr@minetest.net>2013-04-07 22:50:53 -0400
commit98182f6097ec0568545f5612f6ae1354e110333d (patch)
tree125762a72e9c47244b38d013c9b9242db465d3ee /src/guiMessageMenu.cpp
parentcd27c8ef5df35edd2cc606291f3f7985a61d41d5 (diff)
downloadminetest-98182f6097ec0568545f5612f6ae1354e110333d.tar.gz
minetest-98182f6097ec0568545f5612f6ae1354e110333d.tar.bz2
minetest-98182f6097ec0568545f5612f6ae1354e110333d.zip
fix memory leaks introduced by invalid gettext usage
Diffstat (limited to 'src/guiMessageMenu.cpp')
-rw-r--r--src/guiMessageMenu.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/guiMessageMenu.cpp b/src/guiMessageMenu.cpp
index abb31cf2d..c6592e51c 100644
--- a/src/guiMessageMenu.cpp
+++ b/src/guiMessageMenu.cpp
@@ -104,10 +104,12 @@ void GUIMessageMenu::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, bw, 30);
rect = rect + v2s32(size.X/2-bw/2, size.Y/2-30/2+5 + msg_h/2);
+ wchar_t* text = wgettext("Proceed");
gui::IGUIElement *e =
Environment->addButton(rect, this, 257,
- wgettext("Proceed"));
+ text);
Environment->setFocus(e);
+ delete[] text;
}
changeCtype("C");
}