Guard for nil *big.Int
This commit is contained in:
1 parent
585aec127c
commit
2efb89d544
1 file changed
+5
-1
+5
-1
@@ -83,7 +83,11 @@ func newHexData(input interface{}) *hexdata {
|
||||
d.data = input.Bytes()
|
||||
}
|
||||
case *big.Int:
|
||||
d.data = input.Bytes()
|
||||
if input == nil {
|
||||
d.isNil = true
|
||||
} else {
|
||||
d.data = input.Bytes()
|
||||
}
|
||||
case int64:
|
||||
d.data = big.NewInt(input).Bytes()
|
||||
case uint64:
|
||||
|
||||
Reference in new issue
Block a user