mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 01:25:20 +02:00
fix memory leaks introduced by invalid gettext usage
This commit is contained in:
@@ -116,14 +116,18 @@ void GUIConfirmMenu::regenerateGui(v2u32 screensize)
|
||||
{
|
||||
core::rect<s32> rect(0, 0, bw, 30);
|
||||
rect = rect + v2s32(size.X/2-bw/2-(bw/2+5), size.Y/2-30/2+5 + msg_h/2);
|
||||
wchar_t* text = wgettext("Yes");
|
||||
Environment->addButton(rect, this, GUI_ID_YES,
|
||||
wgettext("Yes"));
|
||||
text);
|
||||
delete[] text;
|
||||
}
|
||||
{
|
||||
core::rect<s32> rect(0, 0, bw, 30);
|
||||
rect = rect + v2s32(size.X/2-bw/2+(bw/2+5), size.Y/2-30/2+5 + msg_h/2);
|
||||
wchar_t* text = wgettext("No");
|
||||
Environment->addButton(rect, this, GUI_ID_NO,
|
||||
wgettext("No"));
|
||||
text);
|
||||
delete[] text;
|
||||
}
|
||||
changeCtype("C");
|
||||
}
|
||||
|
Reference in New Issue
Block a user