Skip to content

Commit

Permalink
fix: Don't panic on remove op
Browse files Browse the repository at this point in the history
  • Loading branch information
candiduslynx committed Apr 9, 2024
1 parent d70ab7c commit b4e784f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b4e784f

Please sign in to comment.