Skip to content

Commit b513143

Browse files
committed
Fix empty compound deserialization
1 parent 6cd3420 commit b513143

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

slime-loader/src/main/java/net/roxymc/slime/serializer/SlimeSerializer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ protected CompoundBinaryTag deserializeCompound(ByteArrayDataInput in) throws IO
126126
}
127127

128128
protected CompoundBinaryTag deserializeCompound(int length, ByteArrayDataInput in) throws IOException {
129+
if (length == 0) {
130+
return CompoundBinaryTag.empty();
131+
}
132+
129133
byte[] bytes = new byte[length];
130134
in.readFully(bytes);
131135

0 commit comments

Comments
 (0)