Skip to content

Commit ef3b9c6

Browse files
author
tonimatasdev
committed
Fix problems with length wider than 21-bit
1 parent 6ebf077 commit ef3b9c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/src/main/java/dev/tonimatas/packetfixer/mixins/Varint21FrameDecoderMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public abstract class Varint21FrameDecoderMixin {
2121

2222
@Inject(method = "decode", at = @At("HEAD"))
2323
private void decode(ChannelHandlerContext channelHandlerContext, ByteBuf byteBuf, List<Object> list, CallbackInfo ci) {
24-
packetFixer$varInt21Size = FriendlyByteBuf.getVarIntSize(byteBuf.readableBytes()) + 1;
24+
packetFixer$varInt21Size = FriendlyByteBuf.getVarIntSize(byteBuf.readableBytes()) + 2;
2525
}
2626

2727
@ModifyConstant(method = "decode", constant = @Constant(intValue = 3))

0 commit comments

Comments
 (0)