diff --git a/mouse.c b/mouse.c index 4987b345e..6cec6edd9 100644 --- a/mouse.c +++ b/mouse.c @@ -1146,7 +1146,6 @@ luaA_button_array_set(lua_State *L, int idx, button_array_t *buttons) button_ref(b); lua_pop(L, 1); } - lua_pop(L, 1); } /** Push an array of button as an Lua table onto the stack. diff --git a/widget.c b/widget.c index e425d6c87..24177f584 100644 --- a/widget.c +++ b/widget.c @@ -396,7 +396,10 @@ luaA_widget_buttons(lua_State *L) button_array_t *buttons = &(*widget)->buttons; if(lua_gettop(L) == 2) + { luaA_button_array_set(L, 2, buttons); + return 1; + } return luaA_button_array_get(L, buttons); }