This commit is contained in:
Tnze
2022-12-11 21:58:51 +08:00
parent 55d12fc76f
commit 06260e2b00
2 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@ func (p *Packet) unpackWithoutCompression(r io.Reader) error {
lengthOfData := int(Length) - int(n)
if lengthOfData < 0 || lengthOfData > MaxDataLength {
return fmt.Errorf("uncompressed packet error: lenght is %d", lengthOfData)
return fmt.Errorf("uncompressed packet error: length is %d", lengthOfData)
}
if cap(p.Data) < lengthOfData {
p.Data = make([]byte, lengthOfData)