From 7d69223ef5c83390a54020e0ad0122de6d703e8e Mon Sep 17 00:00:00 2001 From: braydonk Date: Sat, 28 Oct 2023 15:51:09 +0000 Subject: [PATCH] filter_lua: add index to arraylength call When building with `FLB_FILTER_LUA_USE_MPACK`, compilation fails because this `flb_lua_arraylength` call didn't have an index argument. This PR passes the index argument to the function that I believe to be correct, which is `-1` (assuming based on its usage in the following loop to get individual elements). Signed-off-by: braydonk --- plugins/filter_lua/lua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/filter_lua/lua.c b/plugins/filter_lua/lua.c index bb7bb566ab4..3b21b96b92f 100644 --- a/plugins/filter_lua/lua.c +++ b/plugins/filter_lua/lua.c @@ -132,7 +132,7 @@ static void pack_result_mpack(lua_State *l, return; } - len = flb_lua_arraylength(l); + len = flb_lua_arraylength(l, -1); if (len > 0) { /* record split */ for (i = 1; i <= len; i++) {