diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-05-30 12:17:18 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-05-30 12:17:18 -0400 |
commit | 2348cdbe2a3417990a2088f9e4e91adf0c45617d (patch) | |
tree | 031b60037b3fc91d4191b936682f46e0652e07c9 /pkg/binstruct/binint | |
parent | 5cc9d7718fecd0b2b91dcf5acb5d92316c752570 (diff) |
fix
Diffstat (limited to 'pkg/binstruct/binint')
-rw-r--r-- | pkg/binstruct/binint/builtins.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/binstruct/binint/builtins.go b/pkg/binstruct/binint/builtins.go index 3272ed9..9af3c35 100644 --- a/pkg/binstruct/binint/builtins.go +++ b/pkg/binstruct/binint/builtins.go @@ -57,7 +57,7 @@ func (x *U32le) UnmarshalBinary(dat []byte) (int, error) { return 0, err } *x = U32le(binary.LittleEndian.Uint32(dat)) - return 2, nil + return 4, nil } type U64le uint64 @@ -73,7 +73,7 @@ func (x *U64le) UnmarshalBinary(dat []byte) (int, error) { return 0, err } *x = U64le(binary.LittleEndian.Uint64(dat)) - return 2, nil + return 8, nil } // unsigned big endian @@ -107,7 +107,7 @@ func (x *U32be) UnmarshalBinary(dat []byte) (int, error) { return 0, err } *x = U32be(binary.BigEndian.Uint32(dat)) - return 2, nil + return 4, nil } type U64be uint64 @@ -123,7 +123,7 @@ func (x *U64be) UnmarshalBinary(dat []byte) (int, error) { return 0, err } *x = U64be(binary.BigEndian.Uint64(dat)) - return 2, nil + return 8, nil } // signed @@ -171,7 +171,7 @@ func (x *I32le) UnmarshalBinary(dat []byte) (int, error) { return 0, err } *x = I32le(binary.LittleEndian.Uint32(dat)) - return 2, nil + return 4, nil } type I64le int64 @@ -187,7 +187,7 @@ func (x *I64le) UnmarshalBinary(dat []byte) (int, error) { return 0, err } *x = I64le(binary.LittleEndian.Uint64(dat)) - return 2, nil + return 8, nil } // signed big endian @@ -221,7 +221,7 @@ func (x *I32be) UnmarshalBinary(dat []byte) (int, error) { return 0, err } *x = I32be(binary.BigEndian.Uint32(dat)) - return 2, nil + return 4, nil } type I64be int64 @@ -237,5 +237,5 @@ func (x *I64be) UnmarshalBinary(dat []byte) (int, error) { return 0, err } *x = I64be(binary.BigEndian.Uint64(dat)) - return 2, nil + return 8, nil } |