From 15c0f8aaceccc9ba141a83edd0d3a7d12eff6b52 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 a42cca7ca4b..3a6fef2cc1b 100644 --- a/plugins/filter_lua/lua.c +++ b/plugins/filter_lua/lua.c @@ -173,7 +173,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++) {