Skip to content

Commit

Permalink
Fix: make PacketEncoder work again
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas0008 committed Aug 19, 2024
1 parent 222b40c commit 3b55bc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pumpkin-protocol/src/packet_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3b55bc4

Please sign in to comment.