Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 9016f95

Browse files
teejayslunny
authored andcommitted
reflect.Value.Bytes() should only be called when reflect.Value.Kind() is reflect.Slice, and not reflect.Array (#1346)
1 parent 4c80660 commit 9016f95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

session_convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ func (session *Session) value2Interface(col *core.Column, fieldValue reflect.Val
640640
} else if col.SQLType.IsBlob() {
641641
var bytes []byte
642642
var err error
643-
if (k == reflect.Array || k == reflect.Slice) &&
643+
if (k == reflect.Slice) &&
644644
(fieldValue.Type().Elem().Kind() == reflect.Uint8) {
645645
bytes = fieldValue.Bytes()
646646
} else {

0 commit comments

Comments
 (0)