Skip to content
This repository has been archived by the owner on Mar 13, 2019. It is now read-only.

Commit

Permalink
Don't get underlying value for *big.Int
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenroose committed Dec 16, 2016
1 parent ba7f356 commit 6c846cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion types.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,11 @@ func (ctx *Context) decodeNull(data []byte, value reflect.Value) error {
// getActualType recursively gets the underlying type of Interfaces and Pointers.
func getActualType(value reflect.Value) reflect.Value {
for {
if value.Type() == bigIntType {
return value
}
switch value.Kind() {
case reflect.Ptr, reflect.Interface:
case reflect.Interface, reflect.Ptr:
value = value.Elem()
default:
return value
Expand Down

0 comments on commit 6c846cf

Please sign in to comment.