diff --git a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v361/serializer/ClientCacheBlobStatusSerializer_v361.java b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v361/serializer/ClientCacheBlobStatusSerializer_v361.java index 4b22928c2..12f606a96 100644 --- a/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v361/serializer/ClientCacheBlobStatusSerializer_v361.java +++ b/bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/codec/v361/serializer/ClientCacheBlobStatusSerializer_v361.java @@ -33,10 +33,10 @@ public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, ClientCacheBl int maxLength = helper.getEncodingSettings().maxListSize(); int naksLength = VarInts.readUnsignedInt(buffer); - checkArgument(maxLength == 0 || naksLength <= maxLength, "Tried to read %s Nacks but maximum is %s", naksLength, maxLength); + checkArgument(maxLength <= 0 || naksLength <= maxLength, "Tried to read %s Nacks but maximum is %s", naksLength, maxLength); int acksLength = VarInts.readUnsignedInt(buffer); - checkArgument(maxLength == 0 || acksLength <= maxLength, "Tried to read %s Nacks but maximum is %s", acksLength, maxLength); + checkArgument(maxLength <= 0 || acksLength <= maxLength, "Tried to read %s Nacks but maximum is %s", acksLength, maxLength); LongList naks = packet.getNaks(); for (int i = 0; i < naksLength; i++) {