Skip to content

Commit

Permalink
Fix reflect.Pointer backward compatibility (#956)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxVitoxxx committed Aug 17, 2024
1 parent be6c57b commit a437caa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion marshaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ func walkStruct(ctx encoderCtx, t *table, v reflect.Value) {
if fieldType.Anonymous {
if fieldType.Type.Kind() == reflect.Struct {
walkStruct(ctx, t, f)
} else if fieldType.Type.Kind() == reflect.Pointer && !f.IsNil() && f.Elem().Kind() == reflect.Struct {
} else if fieldType.Type.Kind() == reflect.Ptr && !f.IsNil() && f.Elem().Kind() == reflect.Struct {
walkStruct(ctx, t, f.Elem())
}
continue
Expand Down

0 comments on commit a437caa

Please sign in to comment.