* luci/libs: fixed big endian in Hex() constructor
[project/luci.git] / libs / core / luasrc / ip.lua
index 15730db..ad32e27 100644 (file)
@@ -211,6 +211,8 @@ function Hex( hex, prefix, family, swap )
 
        if swap and LITTLE_ENDIAN then
                for i = #hex, 1, -2 do tmp = tmp .. hex:sub( i - 1, i ) end
+       else
+               tmp = tmp .. hex
        end
 
        hex = tmp