fix handling of nil empty interface

This commit is contained in:
Jason Toffaletti
2017-09-14 21:32:42 -07:00
parent e658f6597a
commit 005d86dc44
+2 -1
View File
@@ -373,7 +373,8 @@ func (codec *emptyInterfaceCodec) EncodeInterface(val interface{}, stream *Strea
}
func (codec *emptyInterfaceCodec) IsEmpty(ptr unsafe.Pointer) bool {
return ptr == nil
emptyInterface := (*emptyInterface)(ptr)
return emptyInterface.typ == nil
}
type nonEmptyInterfaceCodec struct {