aboutsummaryrefslogtreecommitdiff
path: root/src/guiFormSpecMenu.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/guiFormSpecMenu.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/guiFormSpecMenu.cpp')
-rw-r--r--src/guiFormSpecMenu.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index 1754422d0..6ada77698 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -581,6 +581,7 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize)
size.Y-rect.getHeight()-5);
const wchar_t *text = wgettext("Left click: Move all items, Right click: Move single item");
Environment->addStaticText(text, rect, false, true, this, 256);
+ delete[] text;
changeCtype("C");
}
// If there's fields, add a Proceed button
@@ -604,7 +605,9 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize)
v2s32 size = DesiredRect.getSize();
rect = core::rect<s32>(size.X/2-70, pos.Y, (size.X/2-70)+140, pos.Y+30);
- Environment->addButton(rect, this, 257, wgettext("Proceed"));
+ wchar_t* text = wgettext("Proceed");
+ Environment->addButton(rect, this, 257, text);
+ delete[] text;
}
changeCtype("C");
}