From 8fd0b2cbc4a6fa969b3882bdb1704d9c3ff5ff7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Mon, 3 Jun 2019 18:40:17 +0000 Subject: fix inspectability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Asbjørn Sloth Tønnesen --- lua/inet/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lua/inet/init.lua') diff --git a/lua/inet/init.lua b/lua/inet/init.lua index 99d1195..72677f9 100644 --- a/lua/inet/init.lua +++ b/lua/inet/init.lua @@ -18,7 +18,9 @@ function inet.new(ip, mask) end function inet:__len() - return self.mask + local mask = self.mask + if mask == nil then return 0 end -- make metatable inspectable + return mask end local lshift = bit32.lshift -- cgit v1.2.1