summaryrefslogtreecommitdiffhomepage
path: root/libs/core/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-08-08 12:55:57 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-08-08 12:55:57 +0000
commite502d88407b9ad17820f0a155dbce160346ced8c (patch)
tree1c4ea9ccbc61ccbba8d50420e31ba52915f0abd5 /libs/core/luasrc
parent069ac1115d4699f66996c04d6801d461ead1b189 (diff)
* luci/libs: fix off-by-one bug in luci.ip
Diffstat (limited to 'libs/core/luasrc')
-rw-r--r--libs/core/luasrc/ip.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/core/luasrc/ip.lua b/libs/core/luasrc/ip.lua
index e6de08f1b2..2fe71297d9 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