Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
borispovod committed Apr 30, 2020
1 parent 6550056 commit ca5cc24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ func (e *Encoder) Encode(v interface{}) error {
func (e *Encoder) encode(rv reflect.Value, enumVariants map[reflect.Type]EnumKeyType, fixedLen int) (err error) {
// encoding u128.
if rv.Type() == reflect.TypeOf(big.Int{}) {
val := rv.Interface().(*big.Int)
bz := BigToBytes(val, 16)
val := rv.Interface().(big.Int)
bz := BigToBytes(&val, 16)
err := binary.Write(e.w, binary.LittleEndian, bz)
return err
}
Expand Down

0 comments on commit ca5cc24

Please sign in to comment.