From 81ea34d045991acf2a701c41220588cdb8eddd68 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 16 Aug 2019 16:31:54 +0100 Subject: [PATCH] [Minor] Lua_ip: fix to_number --- src/lua/lua_ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5