* luci/libs: fixed big endian in Hex() constructor

This commit is contained in:
Jo-Philipp Wich 2008-08-08 01:04:52 +00:00
parent edccb1fc95
commit 12951a951e

View file

@ -211,6 +211,8 @@ function Hex( hex, prefix, family, swap )
if swap and LITTLE_ENDIAN then if swap and LITTLE_ENDIAN then
for i = #hex, 1, -2 do tmp = tmp .. hex:sub( i - 1, i ) end for i = #hex, 1, -2 do tmp = tmp .. hex:sub( i - 1, i ) end
else
tmp = tmp .. hex
end end
hex = tmp hex = tmp