Fix legacy nbt array weirdness

Closes #2176
This commit is contained in:
KennyTV 2020-11-08 10:35:15 +01:00
parent 95e0cff03c
commit 3b5aaa1ff5
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B

View File

@ -96,6 +96,11 @@ import java.util.stream.IntStream;
this.buffer.expect(Tokens.ARRAY_BEGIN); this.buffer.expect(Tokens.ARRAY_BEGIN);
final boolean prefixedIndex = this.buffer.peek() == '0' && this.buffer.peek(1) == ':'; final boolean prefixedIndex = this.buffer.peek() == '0' && this.buffer.peek(1) == ':';
while (this.buffer.hasMore()) { while (this.buffer.hasMore()) {
if (this.buffer.peek() == Tokens.ARRAY_END) {
this.buffer.advance();
return listTag;
}
if (prefixedIndex) { if (prefixedIndex) {
this.buffer.takeUntil(':'); this.buffer.takeUntil(':');
} }