mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 05:41:35 +00:00
accounts/abi/bind: fix destructive packing of *big.Int (#20412)
This commit is contained in:
parent
193ee6d606
commit
e9f9c19c52
1 changed files with 1 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ func packNum(value reflect.Value) []byte {
|
|||
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
|
||||
return math.U256Bytes(big.NewInt(value.Int()))
|
||||
case reflect.Ptr:
|
||||
return math.U256Bytes(value.Interface().(*big.Int))
|
||||
return math.U256Bytes(new(big.Int).Set(value.Interface().(*big.Int)))
|
||||
default:
|
||||
panic("abi: fatal error")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue