fix: fix again the port of EncodeEndian
This commit is contained in:
parent
047f556d36
commit
da57bc1f42
|
@ -3,7 +3,7 @@ package utils
|
||||||
func EncodeEndian(value uint64, length int) []byte {
|
func EncodeEndian(value uint64, length int) []byte {
|
||||||
res := make([]byte, length)
|
res := make([]byte, length)
|
||||||
|
|
||||||
for i := length - 1; i >= 0; i-- {
|
for i := 0; i < length; i++ {
|
||||||
res[i] = byte(value & 0xff)
|
res[i] = byte(value & 0xff)
|
||||||
value = value >> 8
|
value = value >> 8
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue