mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-07-09 01:50:03 +00:00
19 lines
850 B
Diff
19 lines
850 B
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Luna <lunahatesgogle@gmail.com>
|
||
|
Date: Fri, 8 Apr 2022 23:38:12 -0300
|
||
|
Subject: [PATCH] Limit ListTags to 1024 elements
|
||
|
|
||
|
|
||
|
diff --git a/src/main/java/net/minecraft/nbt/ListTag.java b/src/main/java/net/minecraft/nbt/ListTag.java
|
||
|
index 6a5e33d9821221be73f9c16afc17c9130248a231..efcbe34f4307a146ecdfbd0eb96925398251054c 100644
|
||
|
--- a/src/main/java/net/minecraft/nbt/ListTag.java
|
||
|
+++ b/src/main/java/net/minecraft/nbt/ListTag.java
|
||
|
@@ -31,6 +31,7 @@ public class ListTag extends CollectionTag<Tag> {
|
||
|
list.add(tagType.load(dataInput, i + 1, nbtAccounter));
|
||
|
}
|
||
|
|
||
|
+ if(j > 1024) return new ListTag(Lists.newArrayListWithCapacity(0), b);
|
||
|
return new ListTag(list, b);
|
||
|
}
|
||
|
}
|