Skip to content

Commit

Permalink
minecraft/packet.go: Pass the correct reader limit value to the reader (
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownOre committed Sep 6, 2023
1 parent 425582d commit 80dc726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion minecraft/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (p *packetData) decode(conn *Conn) (pks []packet.Packet, err error) {
pk = pkFunc()
}

r := conn.proto.NewReader(p.payload, conn.shieldID.Load(), false)
r := conn.proto.NewReader(p.payload, conn.shieldID.Load(), conn.readerLimits)
pk.Marshal(r)
if p.payload.Len() != 0 {
err = fmt.Errorf("%T: %v unread bytes left: 0x%x", pk, p.payload.Len(), p.payload.Bytes())
Expand Down

0 comments on commit 80dc726

Please sign in to comment.