Skip to content
This repository has been 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

Permalink
reflect.Value.Bytes() should only be called when reflect.Value.Kind()…
Browse files Browse the repository at this point in the history
… is reflect.Slice, and not reflect.Array (#1346)
  • Loading branch information
teejays authored and lunny committed Jul 5, 2019
1 parent 4c80660 commit 9016f95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion session_convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ func (session *Session) value2Interface(col *core.Column, fieldValue reflect.Val
} else if col.SQLType.IsBlob() {
var bytes []byte
var err error
if (k == reflect.Array || k == reflect.Slice) &&
if (k == reflect.Slice) &&
(fieldValue.Type().Elem().Kind() == reflect.Uint8) {
bytes = fieldValue.Bytes()
} else {
Expand Down

0 comments on commit 9016f95

Please sign in to comment.