From 6d3e626f20f2328575eb4b9593f6af60726800e9 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 3 Mar 2022 11:12:22 +0300 Subject: [PATCH] [#1211] neofs-cli: Fix objectIDs list reader Signed-off-by: Alex Vanin --- cmd/neofs-cli/internal/client/client.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/neofs-cli/internal/client/client.go b/cmd/neofs-cli/internal/client/client.go index 80e3f8b928..10d6bc3b7d 100644 --- a/cmd/neofs-cli/internal/client/client.go +++ b/cmd/neofs-cli/internal/client/client.go @@ -679,14 +679,13 @@ func SearchObjects(prm SearchObjectsPrm) (*SearchObjectsRes, error) { for { n, ok = rdr.Read(buf) - if !ok { - break - } - for i := 0; i < n; i++ { v := buf[i] list = append(list, &v) } + if !ok { + break + } } _, err = rdr.Close()