From bcb76350a1bc84debfdc707b3e6d50f41f032311 Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Tue, 30 Jun 2020 16:31:42 -0300 Subject: [PATCH] fix decoder --- .../velocity/handlers/VelocityDecodeHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityDecodeHandler.java b/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityDecodeHandler.java index 4981c2954..fa5ff2a79 100644 --- a/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityDecodeHandler.java +++ b/velocity/src/main/java/us/myles/ViaVersion/velocity/handlers/VelocityDecodeHandler.java @@ -34,14 +34,14 @@ public class VelocityDecodeHandler extends MessageToMessageDecoder { ByteBuf transformedBuf = ctx.alloc().buffer().writeBytes(bytebuf); try { - boolean needsCompress = handleCompressionOrder(ctx, bytebuf); + boolean needsCompress = handleCompressionOrder(ctx, transformedBuf); - info.transformIncoming(bytebuf, CancelDecoderException::generate); + info.transformIncoming(transformedBuf, CancelDecoderException::generate); if (needsCompress) { - recompress(ctx, bytebuf); + recompress(ctx, transformedBuf); } - out.add(bytebuf.retain()); + out.add(transformedBuf.retain()); } finally { transformedBuf.release(); }