Skip to content

Commit

Permalink
lua unpack -> table.unpack
Browse files Browse the repository at this point in the history
lua 5.4 apparently fully did away with the former.

Fixes #5546
  • Loading branch information
Pentarctagon committed Feb 15, 2021
1 parent f1f8769 commit 7349ac6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data/lua/core.lua
Expand Up @@ -699,7 +699,7 @@ local function reorder_dialog_args(t, n)
table.insert( res, t[1])
table.remove( t, 1 )
end
local w = open_dialogs[1]:find(unpack(t))
local w = open_dialogs[1]:find(table.unpack(t))
return w, res
end

Expand All @@ -720,7 +720,7 @@ end

local function set_dialog_canvas(...)
local w, args = reorder_dialog_args({...}, 2)
w:set_canvas(unpack(args))
w:set_canvas(table.unpack(args))
end

local function set_dialog_focus(...)
Expand Down Expand Up @@ -750,12 +750,12 @@ end

local function add_dialog_tree_node(...)
local w, args = reorder_dialog_args({...}, 2)
w:add_item_of_type(unpack(args))
w:add_item_of_type(table.unpack(args))
end

local function remove_dialog_item(...)
local w, args = reorder_dialog_args({...}, 2)
w:remove_items_at(unpack(args))
w:remove_items_at(table.unpack(args))
end

local old_show_dialog = gui.show_dialog
Expand Down

0 comments on commit 7349ac6

Please sign in to comment.