Fix: make PacketEncoder work again
This commit is contained in:
parent
222b40c8bd
commit
3b55bc428c
@ -83,10 +83,10 @@ impl PacketEncoder {
|
||||
self.buf
|
||||
.copy_within(start_len..start_len + data_len, start_len + data_prefix_len);
|
||||
|
||||
let front = &mut self.buf[start_len..];
|
||||
let mut front = &mut self.buf[start_len..];
|
||||
|
||||
VarInt(packet_len as i32)
|
||||
.encode(front.as_mut())
|
||||
.encode(&mut front)
|
||||
.map_err(|_| PacketError::EncodeLength)?;
|
||||
// Zero for no compression on this packet.
|
||||
VarInt(0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user