From e502d88407b9ad17820f0a155dbce160346ced8c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 8 Aug 2008 12:55:57 +0000 Subject: [PATCH] * luci/libs: fix off-by-one bug in luci.ip --- libs/core/luasrc/ip.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/core/luasrc/ip.lua b/libs/core/luasrc/ip.lua index e6de08f1b..2fe71297d 100644 --- a/libs/core/luasrc/ip.lua +++ b/libs/core/luasrc/ip.lua @@ -333,7 +333,7 @@ function cidr.network( self, bits ) if #data < #self[2] then 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 ) end end -- 2.11.0