From ad377449e8662ecc2f10efcc5fbcbbe62fe76feb Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 29 Jun 2016 14:14:30 +0000 Subject: MirLua: fixed tomparam function git-svn-id: http://svn.miranda-ng.org/main/trunk@17043 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua_utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/MirLua/src/mlua_utils.cpp b/plugins/MirLua/src/mlua_utils.cpp index 0abf0c66c1..6ee3f44186 100644 --- a/plugins/MirLua/src/mlua_utils.cpp +++ b/plugins/MirLua/src/mlua_utils.cpp @@ -191,9 +191,9 @@ UINT_PTR luaM_tomparam(lua_State *L, int idx) return (UINT_PTR)lua_touserdata(L, idx); case LUA_TNUMBER: { - if (lua_isinteger(L, 1)) + if (lua_isinteger(L, idx)) { - lua_Integer value = lua_tointeger(L, 1); + lua_Integer value = lua_tointeger(L, idx); return value <= INTPTR_MAX ? (UINT_PTR)value : NULL; -- cgit v1.2.3