Allow compound tag with empty name

This commit is contained in:
Valentin Fritz 2024-05-17 00:42:51 +02:00 committed by GitHub
parent d6e0075b74
commit 7f020e1c51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -306,7 +306,7 @@ public class TagWriter : TagIO
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void WriteTypeAndName(Tag tag)
{
if (tag.Parent is ListTag || string.IsNullOrEmpty(tag.Name))
if (tag.Parent is ListTag)
return;
BaseStream.WriteByte((byte) tag.Type);
@ -384,4 +384,4 @@ public class TagWriter : TagIO
else
BaseStream.Write(GetBytes(count), 0, sizeof(int));
}
}
}