diff --git a/cmd/struct_equal_generator/generate.tmpl b/cmd/struct_equal_generator/generate.tmpl index e8882220..7209d05d 100644 --- a/cmd/struct_equal_generator/generate.tmpl +++ b/cmd/struct_equal_generator/generate.tmpl @@ -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" }}