* luci/libs: fixed big endian in Hex() constructor
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 8 Aug 2008 01:04:52 +0000 (01:04 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 8 Aug 2008 01:04:52 +0000 (01:04 +0000)
libs/core/luasrc/ip.lua

index 15730dbacc414bb9b09e8168bcceaab6e41da303..ad32e27c6e31ec849466f52389c5ca4845cf9f6b 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