1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +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

@ -1501,7 +1501,9 @@ int main(int argc, char *argv[])
while(device->run() && kill == false)
{
// Set the window caption
device->setWindowCaption((std::wstring(L"Minetest [")+wgettext("Main Menu")+L"]").c_str());
wchar_t* text = wgettext("Main Menu");
device->setWindowCaption((std::wstring(L"Minetest [")+text+L"]").c_str());
delete[] text;
// This is used for catching disconnects
try