Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Fix off-by-one error in MinecraftCompressEncoder
Dieser Commit ist enthalten in:
Ursprung
42d211bf08
Commit
1f9c24566d
@ -20,7 +20,7 @@ public class MinecraftCompressEncoder extends MessageToByteEncoder<ByteBuf> {
|
||||
@Override
|
||||
protected void encode(ChannelHandlerContext ctx, ByteBuf msg, ByteBuf out) throws Exception {
|
||||
int uncompressed = msg.readableBytes();
|
||||
if (uncompressed <= threshold) {
|
||||
if (uncompressed < threshold) {
|
||||
// Under the threshold, there is nothing to do.
|
||||
ProtocolUtils.writeVarInt(out, 0);
|
||||
out.writeBytes(msg);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren