Skip to content

Commit dea3e6d

Browse files
authored
fix: Don't panic on remove op (#205)
Closes #204 Signed-off-by: candiduslynx <[email protected]>
1 parent 00bc1c8 commit dea3e6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

connection.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ func (c *conn) execStagingOperation(
576576
return dbsqlerrint.NewDriverError(ctx, "error fetching staging operation results", err)
577577
}
578578
var stringValues []string = make([]string, 4)
579-
for i := range stringValues {
580-
if s, ok := sqlRow[i].(string); ok {
579+
for i, val := range sqlRow { // this will either be 3 (remove op) or 4 (put/get) elements
580+
if s, ok := val.(string); ok {
581581
stringValues[i] = s
582582
} else {
583583
return dbsqlerrint.NewDriverError(ctx, "received unexpected response from the server.", nil)

0 commit comments

Comments
 (0)