Skip to content

Commit c59c42f

Browse files
committed
fix decoding of nil non-empty interface
1 parent 8324374 commit c59c42f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

feature_reflect_native.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,9 @@ func (codec *nonEmptyInterfaceCodec) Decode(ptr unsafe.Pointer, iter *Iterator)
391391
e.typ = nonEmptyInterface.itab.typ
392392
e.word = nonEmptyInterface.word
393393
iter.ReadVal(&i)
394+
if e.word == nil {
395+
nonEmptyInterface.itab = nil
396+
}
394397
nonEmptyInterface.word = e.word
395398
}
396399

0 commit comments

Comments
 (0)