summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src')
-rw-r--r--plugins/MirLua/src/m_protocols.cpp2
-rw-r--r--plugins/MirLua/src/mlua_metatable.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/MirLua/src/m_protocols.cpp b/plugins/MirLua/src/m_protocols.cpp
index 5bcc6a829d..dd3db59833 100644
--- a/plugins/MirLua/src/m_protocols.cpp
+++ b/plugins/MirLua/src/m_protocols.cpp
@@ -99,7 +99,7 @@ static int lua_AccountIterator(lua_State *L)
{
int i = lua_tointeger(L, lua_upvalueindex(1));
int count = lua_tointeger(L, lua_upvalueindex(2));
- PROTOACCOUNT** accounts = (PROTOACCOUNT**)lua_touserdata(L, lua_upvalueindex(3));
+ PROTOACCOUNT **accounts = (PROTOACCOUNT**)lua_touserdata(L, lua_upvalueindex(3));
if (i < count)
{
diff --git a/plugins/MirLua/src/mlua_metatable.h b/plugins/MirLua/src/mlua_metatable.h
index 6e8ddc3cf5..deb4c66cef 100644
--- a/plugins/MirLua/src/mlua_metatable.h
+++ b/plugins/MirLua/src/mlua_metatable.h
@@ -193,8 +193,8 @@ public:
return;
}
- T *udata = (T*)lua_newuserdata(L, sizeof(T));
- memcpy(udata, obj, sizeof(T));
+ T **udata = (T**)lua_newuserdata(L, sizeof(T));
+ *udata = obj;
luaL_setmetatable(L, MT::name);
}
};