canonical code
This commit is contained in:
parent
2b5d5e0a11
commit
960d801276
@ -52,9 +52,10 @@ func (this *Column) convertArg(arg interface{}) interface{} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if this.Type == BinaryColumnType {
|
if this.Type == BinaryColumnType {
|
||||||
size := len([]byte(arg.(string)))
|
arg2Bytes := []byte(arg.(string))
|
||||||
|
size := len(arg2Bytes)
|
||||||
if uint(size) < this.BinaryOctetLength {
|
if uint(size) < this.BinaryOctetLength {
|
||||||
buf := bytes.NewBuffer([]byte(arg.(string)))
|
buf := bytes.NewBuffer(arg2Bytes)
|
||||||
for i := uint(0); i < (this.BinaryOctetLength - uint(size)); i++ {
|
for i := uint(0); i < (this.BinaryOctetLength - uint(size)); i++ {
|
||||||
buf.Write([]byte{0})
|
buf.Write([]byte{0})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user