Skip to content

Commit a437caa

Browse files
authored
Fix reflect.Pointer backward compatibility (#956)
1 parent be6c57b commit a437caa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

marshaler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ func walkStruct(ctx encoderCtx, t *table, v reflect.Value) {
744744
if fieldType.Anonymous {
745745
if fieldType.Type.Kind() == reflect.Struct {
746746
walkStruct(ctx, t, f)
747-
} else if fieldType.Type.Kind() == reflect.Pointer && !f.IsNil() && f.Elem().Kind() == reflect.Struct {
747+
} else if fieldType.Type.Kind() == reflect.Ptr && !f.IsNil() && f.Elem().Kind() == reflect.Struct {
748748
walkStruct(ctx, t, f.Elem())
749749
}
750750
continue

0 commit comments

Comments
 (0)