3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-28 09:00:09 +01:00

Check for lore length, not component length

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-04-23 23:53:24 +02:00
Ursprung ebbe1b6da2
Commit b78f9d350b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -989,10 +989,11 @@ public class ComponentRewriter1_20_5 extends ComponentRewriter<ClientboundPacket
} }
protected ListTag<StringTag> convertComponents(final Tag[] value, final int maxLength) { protected ListTag<StringTag> convertComponents(final Tag[] value, final int maxLength) {
checkIntRange(0, maxLength, value.length);
final ListTag<StringTag> listTag = new ListTag<>(StringTag.class); final ListTag<StringTag> listTag = new ListTag<>(StringTag.class);
for (final Tag tag : value) { for (final Tag tag : value) {
final String json = serializerVersion().toString(serializerVersion().toComponent(tag)); final String json = serializerVersion().toString(serializerVersion().toComponent(tag));
listTag.add(new StringTag(checkStringRange(0, maxLength, json))); listTag.add(new StringTag(json));
} }
return listTag; return listTag;
} }