libs/ip: return a copy of given tables in __mask16() to avoid destroying them later
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 27 Dec 2008 01:42:34 +0000 (01:42 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 27 Dec 2008 01:42:34 +0000 (01:42 +0000)
libs/core/luasrc/ip.lua

index 98666e5a52a8c895adb66e031a0dd93f3c684448..8ac017e0228098ee1ce53fc6668697af9cf8fdd0 100644 (file)
@@ -65,7 +65,7 @@ local function __array16( x, family )
                list = { unpack(x[2]) }
 
        elseif type(x) == "table" then
-               list = x
+               list = { unpack(x) }
        end
 
        assert( list, "Invalid operand" )