Skip to content

Commit 14861e0

Browse files
authored
Fix: Handle index out of range error (#52)
1 parent 468ce24 commit 14861e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utilities/proxy_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func DecodeBytesToSpannerColumnType(b []byte, choice datatype.DataType, protocol
8585
return nil, fmt.Errorf("error while casting to int64")
8686
}
8787
case primitive.DataTypeCodeBoolean:
88-
if b[0] == 0 {
88+
if len(b) == 0 || b[0] == 0 {
8989
return false, nil
9090
} else {
9191
return true, nil

0 commit comments

Comments
 (0)