* luci/libs: fix off-by-one bug in luci.ip

This commit is contained in:
Jo-Philipp Wich 2008-08-08 12:55:57 +00:00
parent 069ac1115d
commit e502d88407

View file

@ -333,7 +333,7 @@ function cidr.network( self, bits )
if #data < #self[2] then if #data < #self[2] then
table.insert( data, bit.band( self[2][1+#data], __mask16(bits) ) ) table.insert( data, bit.band( self[2][1+#data], __mask16(bits) ) )
for i = #data, #self[2] do for i = #data + 1, #self[2] do
table.insert( data, 0 ) table.insert( data, 0 )
end end
end end