Skip to content

Commit

Permalink
BUG: fix index for pointers comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmatmati committed Dec 16, 2024
1 parent acb903f commit d7abc10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/struct_equal_generator/generate.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (s {{.Data.Name}}) {{.Name}}(t {{.Data.Name}}, opts ...Options) {{- if eq $
}
{{- else }}
{{- if HasPrefix .SubType.Type "*" }}
if !equalPointers(s.{{.Name}}, t.{{.Name}}) {
if !equalPointers(s.{{.Name}}[i], t.{{.Name}}[i]) {
{{- if eq $topLevel.Name "Equal" }}
return false
{{- else if eq $topLevel.Name "Diff" }}
Expand Down

0 comments on commit d7abc10

Please sign in to comment.