From: Vsevolod Stakhov Date: Fri, 16 Aug 2019 15:31:54 +0000 (+0100) Subject: [Minor] Lua_ip: fix to_number X-Git-Tag: 2.0~405 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=81ea34d045991acf2a701c41220588cdb8eddd68;p=rspamd.git [Minor] Lua_ip: fix to_number --- diff --git a/src/lua/lua_ip.c b/src/lua/lua_ip.c index 7f24f7712..3c3ef2d51 100644 --- a/src/lua/lua_ip.c +++ b/src/lua/lua_ip.c @@ -403,7 +403,7 @@ lua_ip_to_number (lua_State *L) lua_pushinteger (L, ntohl (c)); } - return max; + return max / sizeof (c); } else { lua_pushnil (L);