diff --git a/src/nhlsel.c b/src/nhlsel.c index fba73357c..b65f3216d 100644 --- a/src/nhlsel.c +++ b/src/nhlsel.c @@ -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); diff --git a/src/sp_lev.c b/src/sp_lev.c index dc2df6a77..3eb228453 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -3581,7 +3581,7 @@ lua_State *L UNUSED; struct selectionvar * selection_new() { - struct selectionvar *tmps = (struct selectionvar *) alloc(sizeof tmps); + struct selectionvar *tmps = (struct selectionvar *) alloc(sizeof(struct selectionvar)); tmps->wid = COLNO; tmps->hei = ROWNO;