use table.pack()
This commit is contained in:
parent
cf0bfad049
commit
f876d53d23
@ -61,7 +61,7 @@ end
|
||||
-- same [multiple] values if no error happens. On error, logs it.
|
||||
local function safe_wrap(func)
|
||||
local function wrap_f(...)
|
||||
local res = {xpcall(func, error_printer, ...)}
|
||||
local res = table.pack(xpcall(func, error_printer, ...))
|
||||
if res[1] then
|
||||
-- no error, just return rest of the values
|
||||
return select(2, unpack(res))
|
||||
|
Loading…
Reference in New Issue
Block a user