소스 검색

fix decoding of nil non-empty interface

Jason Toffaletti 8 년 전
부모
커밋
c59c42fda0
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      feature_reflect_native.go

+ 3 - 0
feature_reflect_native.go

@@ -391,6 +391,9 @@ func (codec *nonEmptyInterfaceCodec) Decode(ptr unsafe.Pointer, iter *Iterator)
 	e.typ = nonEmptyInterface.itab.typ
 	e.word = nonEmptyInterface.word
 	iter.ReadVal(&i)
+	if e.word == nil {
+		nonEmptyInterface.itab = nil
+	}
 	nonEmptyInterface.word = e.word
 }