Skip to content

Commit

Permalink
filter_lua: add index to arraylength call
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
braydonk authored and edsiper committed Nov 6, 2023
1 parent 94d9fbf commit 15c0f8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/filter_lua/lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 15c0f8a

Please sign in to comment.