From 84c367bb468441efe428478d3918f07a9b6c2d72 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Wed, 21 Jan 2015 15:11:34 -0500 Subject: [PATCH] Fix translation memory leak --- src/game.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game.cpp b/src/game.cpp index bb1f3e93..acc7a3a3 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; } }