]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Lua_ip: fix to_number
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Aug 2019 15:31:54 +0000 (16:31 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Aug 2019 15:31:54 +0000 (16:31 +0100)
src/lua/lua_ip.c

index 7f24f77123dadbbc113dd4fa824954277b58ba2e..3c3ef2d512754eb10801134a9e2982824967eb2d 100644 (file)
@@ -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);