mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
mailformed -> malformed
This commit is contained in:
@@ -143,7 +143,7 @@ pub enum PacketError {
|
||||
#[error("packet length is out of bounds")]
|
||||
OutOfBounds,
|
||||
#[error("malformed packet length VarInt")]
|
||||
MailformedLength,
|
||||
MalformedLength,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
|
||||
@@ -28,7 +28,7 @@ impl PacketDecoder {
|
||||
let packet_len = match VarInt::decode_partial(&mut r) {
|
||||
Ok(len) => len,
|
||||
Err(VarIntDecodeError::Incomplete) => return Ok(None),
|
||||
Err(VarIntDecodeError::TooLarge) => Err(PacketError::MailformedLength)?,
|
||||
Err(VarIntDecodeError::TooLarge) => Err(PacketError::MalformedLength)?,
|
||||
};
|
||||
|
||||
if !(0..=MAX_PACKET_SIZE).contains(&packet_len) {
|
||||
|
||||
Reference in New Issue
Block a user