From 79a8c901787604552bbed732f6674eecb633ff59 Mon Sep 17 00:00:00 2001 From: Juliana Fajardini Date: Mon, 26 Jul 2021 13:24:02 +0100 Subject: [PATCH] util-lua-common: use lua_pushinteger w/ int values replace lua_pushnumber with lua_pushinteger for SCFlowStats and SCRuleIds. (cherry picked from commit 9b6ce274877ca825dbcbda0a7e540660004b5390) --- src/util-lua-common.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util-lua-common.c b/src/util-lua-common.c index 2477ffc2ad..38140bbb29 100644 --- a/src/util-lua-common.c +++ b/src/util-lua-common.c @@ -493,9 +493,9 @@ static int LuaCallbackAppLayerProtoFlow(lua_State *luastate) */ static int LuaCallbackStatsPushToStackFromFlow(lua_State *luastate, const Flow *f) { - lua_pushnumber(luastate, f->todstpktcnt); + lua_pushinteger(luastate, f->todstpktcnt); lua_pushnumber(luastate, f->todstbytecnt); - lua_pushnumber(luastate, f->tosrcpktcnt); + lua_pushinteger(luastate, f->tosrcpktcnt); lua_pushnumber(luastate, f->tosrcbytecnt); return 4; } @@ -557,9 +557,9 @@ static int LuaCallbackFlowId(lua_State *luastate) */ static int LuaCallbackRuleIdsPushToStackFromPacketAlert(lua_State *luastate, const PacketAlert *pa) { - lua_pushnumber (luastate, pa->s->id); - lua_pushnumber (luastate, pa->s->rev); - lua_pushnumber (luastate, pa->s->gid); + lua_pushinteger(luastate, pa->s->id); + lua_pushinteger(luastate, pa->s->rev); + lua_pushinteger(luastate, pa->s->gid); return 3; } -- 2.47.2