test
This commit is contained in:
parent
856d7c4b4e
commit
fc76b1eeab
4
main.go
4
main.go
@ -26,10 +26,10 @@ func main() {
|
|||||||
p := Packet{}
|
p := Packet{}
|
||||||
b, err := r.ReadByte()
|
b, err := r.ReadByte()
|
||||||
logErrorDebug(err, "conn.ReadByte")
|
logErrorDebug(err, "conn.ReadByte")
|
||||||
p.PLength = uint8(b) << 8
|
p.PLength = uint16(b) << 8
|
||||||
b, err = r.ReadByte()
|
b, err = r.ReadByte()
|
||||||
logErrorDebug(err, "conn.ReadByte")
|
logErrorDebug(err, "conn.ReadByte")
|
||||||
p.PLength += uint8(b)
|
p.PLength += uint16(b)
|
||||||
b, err = r.ReadByte()
|
b, err = r.ReadByte()
|
||||||
logErrorDebug(err, "conn.ReadByte")
|
logErrorDebug(err, "conn.ReadByte")
|
||||||
p.PType = uint8(b)
|
p.PType = uint8(b)
|
||||||
|
Loading…
Reference in New Issue
Block a user