diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-06-16 15:15:01 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-06-16 15:15:01 +0000 |
commit | 6dc20e70f308daee742372a7978c1f65668186f3 (patch) | |
tree | 232e56b9d1c8766221902a946b2cdc63355e0873 /plugins/MirLua/src/mlua.cpp | |
parent | c9700c210aa7252faa78af4fbd39a6e0de9f1642 (diff) |
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
Diffstat (limited to 'plugins/MirLua/src/mlua.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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);
|