From 6dc20e70f308daee742372a7978c1f65668186f3 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 16 Jun 2015 15:15:01 +0000 Subject: MirLua: - added variables module - strings passed through WPARAM/LPARAM should be ansi git-svn-id: http://svn.miranda-ng.org/main/trunk@14207 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/MirLua/src/mlua.cpp') diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index e67caf6272..f7b5208ccb 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -20,6 +20,7 @@ CMLua::CMLua() : L(NULL) Preload(MLUA_GENMENU, luaopen_m_genmenu); Preload(MLUA_MSGBUTTONSBAR, luaopen_m_msg_buttonsbar); Preload(MLUA_TOPTOOLBAR, luaopen_m_toptoolbar); + Preload(MLUA_VARIABLES, luaopen_m_variables); } CMLua::~CMLua() @@ -65,7 +66,7 @@ WPARAM CMLua::GetWParam(lua_State *L, int idx) wParam = lua_tonumber(L, idx); break; case LUA_TSTRING: - wParam = (WPARAM)lua_tostring(L, idx); + wParam = (LPARAM)mir_utf8decode((char*)lua_tostring(L, idx), NULL); break; case LUA_TUSERDATA: wParam = (WPARAM)lua_touserdata(L, idx); @@ -86,7 +87,7 @@ LPARAM CMLua::GetLParam(lua_State *L, int idx) lParam = lua_tonumber(L, idx); break; case LUA_TSTRING: - lParam = (LPARAM)lua_tostring(L, idx); + lParam = (LPARAM)mir_utf8decode((char*)lua_tostring(L, idx), NULL); break; case LUA_TUSERDATA: lParam = (LPARAM)lua_touserdata(L, idx); -- cgit v1.2.3