Commit 2efb89d5 authored by Taylor Gerring's avatar Taylor Gerring

Guard for nil *big.Int

parent 585aec12
...@@ -83,7 +83,11 @@ func newHexData(input interface{}) *hexdata { ...@@ -83,7 +83,11 @@ func newHexData(input interface{}) *hexdata {
d.data = input.Bytes() d.data = input.Bytes()
} }
case *big.Int: case *big.Int:
d.data = input.Bytes() if input == nil {
d.isNil = true
} else {
d.data = input.Bytes()
}
case int64: case int64:
d.data = big.NewInt(input).Bytes() d.data = big.NewInt(input).Bytes()
case uint64: case uint64:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment