Fix datagram parsing
This commit is contained in:
parent
17ecf10f79
commit
ffe6ac7161
@ -30,7 +30,7 @@ func NewDatagramFrom(r io.Reader) (*Datagram, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if !bytes.Equal([]byte{Reserved, Reserved}, buf[:1]) {
|
if !bytes.Equal([]byte{Reserved, Reserved}, buf[:2]) {
|
||||||
return nil, ErrBadDatagram
|
return nil, ErrBadDatagram
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user