From d39193400f794b6fdc300958dca77d117f7d6b8c Mon Sep 17 00:00:00 2001 From: Myles Date: Tue, 9 Feb 2021 10:50:11 +0000 Subject: [PATCH] Ignore NBT with hanging comma, fixes #2319 --- .../myles/ViaVersion/api/minecraft/nbt/TagStringReader.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/main/java/us/myles/ViaVersion/api/minecraft/nbt/TagStringReader.java b/common/src/main/java/us/myles/ViaVersion/api/minecraft/nbt/TagStringReader.java index b33f66ea3..aad4ab2b4 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/minecraft/nbt/TagStringReader.java +++ b/common/src/main/java/us/myles/ViaVersion/api/minecraft/nbt/TagStringReader.java @@ -303,6 +303,10 @@ import java.util.stream.IntStream; return true; } this.buffer.expect(Tokens.VALUE_SEPARATOR); + if (this.buffer.skipWhitespace().peek() == endCharacter) { + this.buffer.take(); + return true; + } return false; }