From 73ee7999e30a62da51f39b2fd00fdd787a48c908 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 7 Jul 2015 13:53:15 +0000 Subject: MirLua: string is not supported in WPARAM/LPARAM because of utf8. use Utf8Decode* instead git-svn-id: http://svn.miranda-ng.org/main/trunk@14506 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua_utils.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'plugins/MirLua') diff --git a/plugins/MirLua/src/mlua_utils.cpp b/plugins/MirLua/src/mlua_utils.cpp index 6c9bfa2a97..3a58867171 100644 --- a/plugins/MirLua/src/mlua_utils.cpp +++ b/plugins/MirLua/src/mlua_utils.cpp @@ -38,10 +38,8 @@ WPARAM luaM_towparam(lua_State *L, int idx) case LUA_TNUMBER: wParam = lua_tonumber(L, idx); break; - case LUA_TSTRING: - wParam = (LPARAM)mir_utf8decode((char*)lua_tostring(L, idx), NULL); - break; case LUA_TUSERDATA: + case LUA_TLIGHTUSERDATA: wParam = (WPARAM)lua_touserdata(L, idx); break; } @@ -59,10 +57,8 @@ LPARAM luaM_tolparam(lua_State *L, int idx) case LUA_TNUMBER: lParam = lua_tonumber(L, idx); break; - case LUA_TSTRING: - lParam = (LPARAM)mir_utf8decode((char*)lua_tostring(L, idx), NULL); - break; case LUA_TUSERDATA: + case LUA_TLIGHTUSERDATA: lParam = (LPARAM)lua_touserdata(L, idx); break; } -- cgit v1.2.3