diff --git a/proxy/src/main/java/net/md_5/bungee/netty/CipherCodec.java b/proxy/src/main/java/net/md_5/bungee/netty/CipherCodec.java index a67ab0da8..0295a6b0e 100644 --- a/proxy/src/main/java/net/md_5/bungee/netty/CipherCodec.java +++ b/proxy/src/main/java/net/md_5/bungee/netty/CipherCodec.java @@ -43,7 +43,7 @@ public class CipherCodec extends ByteToByteCodec { out.capacity( outputSize ); } - int processed = cipher.update( in.nioBuffer(), out.nioBuffer( out.readerIndex(), outputSize ) ); + int processed = cipher.update( in.nioBuffer(), out.nioBuffer( out.writerIndex(), outputSize ) ); in.readerIndex( in.readerIndex() + processed ); out.writerIndex( out.writerIndex() + processed ); }