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 authored and mjuraga committed Dec 23, 2024
1 parent ccef2d1 commit 4c78f49
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 @@ -185,7 +185,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 4c78f49

Please sign in to comment.