reflect.Value.Bytes() should only be called when reflect.Value.Kind() is reflect.Slice, and not reflect.Array

This commit is contained in:
Talha Ansari 2019-07-04 21:34:30 -04:00
parent 4c806608ab
commit 2484945c9a
1 changed files with 1 additions and 1 deletions

View File

@ -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 {