From 4c78f491658c92bdf79a6489b8108f93d913cdcd Mon Sep 17 00:00:00 2001 From: Ivan Matmati Date: Mon, 16 Dec 2024 11:13:45 +0100 Subject: [PATCH] BUG: fix index for pointers comparison --- cmd/struct_equal_generator/generate.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" }}