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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp
index cda7655a77..2e4445d71d 100644
--- a/plugins/MirLua/src/m_genmenu.cpp
+++ b/plugins/MirLua/src/m_genmenu.cpp
@@ -7,7 +7,10 @@ static CLISTMENUITEM* MakeMenuItem(lua_State *L)
lua_pushstring(L, "Name");
lua_gettable(L, -2);
- pmi->pszName = mir_utf8decode((char*)luaL_checkstring(L, -1), NULL);
+ if (!(pmi->flags & CMIF_UNICODE))
+ pmi->pszName = mir_utf8decode((char*)lua_tostring(L, -1), NULL);
+ else
+ pmi->ptszName = mir_utf8decodeT((char*)luaL_checkstring(L, -1));
lua_pop(L, 1);
lua_pushstring(L, "Flags");