Alloc sizeof struct instead of pointer-to-struct

This commit is contained in:
Pasi Kallinen
2020-02-13 22:06:50 +02:00
parent 5ca2cdbd86
commit 5885962efd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ lua_State *L;
{
struct selectionvar *tmp = selection_new();
struct selectionvar
*sel = (struct selectionvar *) lua_newuserdata(L, sizeof sel);
*sel = (struct selectionvar *) lua_newuserdata(L, sizeof(struct selectionvar));
luaL_getmetatable(L, "selection");
lua_setmetatable(L, -2);