From b58e17ba32ff47c5c956bb9354f3cfad594a9c32 Mon Sep 17 00:00:00 2001 From: Alex Shcherbakov Date: Tue, 9 Apr 2024 15:19:41 +0300 Subject: [PATCH] fix: Don't panic on `remove` op Signed-off-by: candiduslynx --- connection.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connection.go b/connection.go index 041f05b..91c3a6a 100644 --- a/connection.go +++ b/connection.go @@ -577,8 +577,8 @@ func (c *conn) execStagingOperation( return dbsqlerrint.NewDriverError(ctx, "error fetching staging operation results", err) } var stringValues []string = make([]string, 4) - for i := range stringValues { - if s, ok := sqlRow[i].(string); ok { + for i, val := range sqlRow { // this will either be 3 (remove op) or 4 (put/get) elements + if s, ok := val.(string); ok { stringValues[i] = s } else { return dbsqlerrint.NewDriverError(ctx, "received unexpected response from the server.", nil)