From: ShadowNinja Date: Wed, 21 Jan 2015 20:11:34 +0000 (-0500) Subject: Fix translation memory leak X-Git-Tag: 0.4.12~28 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=84c367bb468441efe428478d3918f07a9b6c2d72;p=oweals%2Fminetest.git Fix translation memory leak --- diff --git a/src/game.cpp b/src/game.cpp index bb1f3e933..acc7a3a31 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -4206,6 +4206,8 @@ void the_game(bool *kill, errorstream << "ServerError: " << e.what() << std::endl; } catch (ModError &e) { errorstream << "ModError: " << e.what() << std::endl; - error_message = narrow_to_wide(e.what()) + wgettext("\nCheck debug.txt for details."); + wchar_t *check_msg = wgettext("\nCheck debug.txt for details."); + error_message = narrow_to_wide(e.what()) + check_msg; + delete [] check_msg; } }