summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_genmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/m_genmenu.cpp')
-rw-r--r--plugins/MirLua/src/m_genmenu.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp
index 2e4445d71d..fb651b1515 100644
--- a/plugins/MirLua/src/m_genmenu.cpp
+++ b/plugins/MirLua/src/m_genmenu.cpp
@@ -5,6 +5,11 @@ static CLISTMENUITEM* MakeMenuItem(lua_State *L)
CLISTMENUITEM *pmi = (CLISTMENUITEM*)mir_calloc(sizeof(CLISTMENUITEM));
pmi->cbSize = sizeof(CLISTMENUITEM);
+ lua_pushstring(L, "Flags");
+ lua_gettable(L, -2);
+ pmi->flags = lua_tointeger(L, -1);
+ lua_pop(L, 1);
+
lua_pushstring(L, "Name");
lua_gettable(L, -2);
if (!(pmi->flags & CMIF_UNICODE))
@@ -13,11 +18,6 @@ static CLISTMENUITEM* MakeMenuItem(lua_State *L)
pmi->ptszName = mir_utf8decodeT((char*)luaL_checkstring(L, -1));
lua_pop(L, 1);
- lua_pushstring(L, "Flags");
- lua_gettable(L, -2);
- pmi->flags = lua_tointeger(L, -1);
- lua_pop(L, 1);
-
lua_pushstring(L, "Position");
lua_gettable(L, -2);
pmi->position = lua_tointeger(L, -1);