use spaces instead of \x00 in handshake message string serialization

This commit is contained in:
Lucas Clemente
2016-06-06 14:07:30 +02:00
parent c0d21ad070
commit 76f7a7d153

View File

@@ -107,5 +107,10 @@ func printHandshakeMessage(data map[Tag][]byte) string {
func tagToString(tag Tag) string {
b := make([]byte, 4)
binary.LittleEndian.PutUint32(b, uint32(tag))
for i := range b {
if b[i] == 0 {
b[i] = ' '
}
}
return string(b)
}