Skip to content

Commit

Permalink
Fix bug with unsighted types
Browse files Browse the repository at this point in the history
Data type 0x26 has an invalid data length or metadata length.
  • Loading branch information
Gavrilov.Nikita2 committed Jan 2, 2022
1 parent 5ec1570 commit fc11aeb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tvp_go19.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ func (tvp TVP) encode(schema, name string, columnStr []columnStruct, tvpFieldInd
elemKind := field.Kind()
if elemKind == reflect.Ptr && valOf.IsNil() {
switch tvpVal.(type) {
case *bool, *time.Time, *int8, *int16, *int32, *int64, *float32, *float64, *int:
case *bool, *time.Time, *int8, *int16, *int32, *int64, *float32, *float64, *int,
*uint8, *uint16, *uint32, *uint64, *uint:
binary.Write(buf, binary.LittleEndian, uint8(0))
continue
default:
Expand Down

0 comments on commit fc11aeb

Please sign in to comment.