use table.pack()

This commit is contained in:
whosit 2025-03-25 02:33:55 +03:00
parent cf0bfad049
commit f876d53d23

View File

@ -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))