Skip to content

Commit fdca2a7

Browse files
committed
fix the encoding from float array values to SCSP protocol, the protocol does not support scientific notation
1 parent 7c0b00d commit fdca2a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chunk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func protocolBufferFromInt(v interface{}) [][]byte {
254254
}
255255

256256
func protocolBufferFromFloat(v interface{}) [][]byte {
257-
return [][]byte{[]byte(fmt.Sprintf("%c%v ", CMD_FLOAT, v))}
257+
return [][]byte{[]byte(fmt.Sprintf("%c%s ", CMD_FLOAT, strconv.FormatFloat(v.(float64), 'f', -1, 64)))}
258258
}
259259

260260
// func protocolBufferFromFloat(v interface{}) [][]byte {

0 commit comments

Comments
 (0)