Browse Source

#78 not null pointer is considered not empty

Tao Wen 8 năm trước cách đây
mục cha
commit
76e62088df
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      feature_reflect.go

+ 1 - 1
feature_reflect.go

@@ -107,7 +107,7 @@ func (encoder *optionalEncoder) IsEmpty(ptr unsafe.Pointer) bool {
 	if *((*unsafe.Pointer)(ptr)) == nil {
 		return true
 	} else {
-		return encoder.valueEncoder.IsEmpty(*((*unsafe.Pointer)(ptr)))
+		return false
 	}
 }