From 08d411ef426d5b630f0f4592be904ab9e1bd5e5a Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 17 Feb 2016 12:03:55 +0000 Subject: MirLua: fixed result of event hooks git-svn-id: http://svn.miranda-ng.org/main/trunk@16291 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_core.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/MirLua/src/m_core.cpp') diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp index c46095ec92..042b628f4f 100644 --- a/plugins/MirLua/src/m_core.cpp +++ b/plugins/MirLua/src/m_core.cpp @@ -35,7 +35,7 @@ int HookEventLuaStateParam(void *obj, WPARAM wParam, LPARAM lParam, LPARAM param luaM_pcall(L, 2, 1); - return lua_tointeger(L, 1); + return lua_tointeger(L, -1); } int HookEventScriptParam(void *obj, WPARAM wParam, LPARAM lParam, LPARAM param) @@ -57,7 +57,7 @@ int HookEventScriptParam(void *obj, WPARAM wParam, LPARAM lParam, LPARAM param) luaM_pcall(script->L, 2, 1); - return lua_tointeger(script->L, 1); + return lua_tointeger(script->L, -1); } static int core_HookEvent(lua_State *L) -- cgit v1.2.3