good morning!!!!

Skip to content
Snippets Groups Projects
Commit edfd2757 authored by Taylor Gerring's avatar Taylor Gerring
Browse files

Better decoding of uint*

parent b10e33c0
No related branches found
No related tags found
No related merge requests found
......@@ -101,11 +101,15 @@ func newHexData(input interface{}) *hexdata {
case int16:
d.data = big.NewInt(int64(input)).Bytes()
case uint16:
d.data = big.NewInt(int64(input)).Bytes()
buff := make([]byte, 8)
binary.BigEndian.PutUint16(buff, input)
d.data = buff
case int32:
d.data = big.NewInt(int64(input)).Bytes()
case uint32:
d.data = big.NewInt(int64(input)).Bytes()
buff := make([]byte, 8)
binary.BigEndian.PutUint32(buff, input)
d.data = buff
case string: // hexstring
d.data = common.Big(input).Bytes()
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment