From a30e345aef1f425106dcd9b9b905feb95f3f498a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Thu, 12 Jun 2025 18:21:02 +0200 Subject: [PATCH] fix incorrect prealloc Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- document/document.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/document/document.go b/document/document.go index b2df3b4..e6451f1 100644 --- a/document/document.go +++ b/document/document.go @@ -97,7 +97,7 @@ func fromAux(aux *aux) (*Document, error) { } res.controllers = []string{s} case json.Unmarshal(aux.Controllers, &ss) == nil: // we have an array of strings - res.controllers = make([]string, len(aux.Controllers)) + res.controllers = make([]string, len(ss)) for i, s := range ss { if !did.HasValidDIDSyntax(s) { return nil, errors.New("one controllers has an invalid DID syntax")