fix typos in error messages when parsing Version Negotiation packets

This commit is contained in:
Marten Seemann 2019-06-29 11:00:57 +07:00
parent 0333f424bb
commit 4fe0f6752c
2 changed files with 4 additions and 4 deletions

View file

@ -208,10 +208,10 @@ func (h *Header) parseLongHeader(b *bytes.Reader) error {
func (h *Header) parseVersionNegotiationPacket(b *bytes.Reader) error {
if b.Len() == 0 {
return errors.New("Version Negoation packet has empty version list")
return errors.New("Version Negotiation packet has empty version list")
}
if b.Len()%4 != 0 {
return errors.New("Version Negotation packet has a version list with an invalid length")
return errors.New("Version Negotiation packet has a version list with an invalid length")
}
h.SupportedVersions = make([]protocol.VersionNumber, b.Len()/4)
for i := 0; b.Len() > 0; i++ {