From 7b9adbe65b8bbbe54e6d92bc3d5d65acb049ecf9 Mon Sep 17 00:00:00 2001 From: martii Date: Wed, 8 May 2013 21:53:09 +0200 Subject: [PATCH] lua: msgbox fix --- src/gui/luainstance.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index f9d93571d..93ed8de87 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -1240,7 +1240,7 @@ int CLuaInstance::MessageboxExec(lua_State *L) { "ok", CMessageBox::mbrOk }, { NULL, 0 } }; - if (tableLookup(L, "default", tmp)) + if (tableLookup(L, "default", tmp)) { lua_pushvalue(L, -2); const char *val = lua_tostring(L, -2); for (int i = 0; mbr[i].name; i++) @@ -1248,6 +1248,7 @@ int CLuaInstance::MessageboxExec(lua_State *L) default_button = mbr[i].code; break; } + } int res = ShowMsgUTF(name.c_str(), text.c_str(), (CMessageBox::result_) default_button, (CMessageBox::buttons_) show_buttons, icon.empty() ? NULL : icon.c_str(), width, timeout, return_default_on_timeout);