Fix: make PacketEncoder work again
This commit is contained in:
1 parent
222b40c8bd
commit
3b55bc428c
1 file changed
+2
-2
@@ -83,10 +83,10 @@ impl PacketEncoder {
|
|||||||
self.buf
|
self.buf
|
||||||
.copy_within(start_len..start_len + data_len, start_len + data_prefix_len);
|
.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)
|
VarInt(packet_len as i32)
|
||||||
.encode(front.as_mut())
|
.encode(&mut front)
|
||||||
.map_err(|_| PacketError::EncodeLength)?;
|
.map_err(|_| PacketError::EncodeLength)?;
|
||||||
// Zero for no compression on this packet.
|
// Zero for no compression on this packet.
|
||||||
VarInt(0)
|
VarInt(0)
|
||||||
|
|||||||
Reference in new issue
Block a user