From b268918f40ae0e995dde8d85fa9322ed3138c31a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Dausseur?= Date: Fri, 2 Jan 2026 12:12:54 +0100 Subject: [PATCH] handling lua 5.1/5.4 --- src/testium/lua_func/handle.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/testium/lua_func/handle.lua b/src/testium/lua_func/handle.lua index 1bd0220..6c176ac 100644 --- a/src/testium/lua_func/handle.lua +++ b/src/testium/lua_func/handle.lua @@ -1,6 +1,8 @@ local utils = require("utils") local tm = require("tm") +local unpack = unpack or table.unpack + local handle = {} local function _get_func_by_path(file_path, func_name) @@ -54,7 +56,7 @@ function handle.func_call(params) if err == nil then print(string.format("Function executed from '%s'", pfile)) utils.log("func_call function found '%s', '%s'", file, fname) - succ, ret = pcall(func, table.unpack(prms)) + succ, ret = pcall(func, unpack(prms)) utils.log("func_call returned '%s', '%s'", tostring(succ), tostring(ret)) if succ then