diff options
Diffstat (limited to 'src/encoding')
| -rw-r--r-- | src/encoding/json/decode.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding/json/decode.go b/src/encoding/json/decode.go index 1a05ef59a2..98102291ab 100644 --- a/src/encoding/json/decode.go +++ b/src/encoding/json/decode.go @@ -472,7 +472,7 @@ func indirect(v reflect.Value, decodingNull bool) (Unmarshaler, encoding.TextUnm // Prevent infinite loop if v is an interface pointing to its own address: // var v any // v = &v - if v.Elem().Kind() == reflect.Interface && v.Elem().Elem() == v { + if v.Elem().Kind() == reflect.Interface && v.Elem().Elem().Equal(v) { v = v.Elem() break } |
