summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua_metatable.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/mlua_metatable.h')
-rw-r--r--plugins/MirLua/src/mlua_metatable.h4
1 files changed, 2 insertions, 2 deletions
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);
}
};