1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

fix memory leaks introduced by invalid gettext usage

This commit is contained in:
sapier 2013-04-07 19:15:17 +02:00 committed by kwolekr
parent cd27c8ef5d
commit 98182f6097
14 changed files with 344 additions and 146 deletions

View file

@ -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");
}