Skip to content

Commit cb70b24

Browse files
committed
Fix capacity check condition in ensureTagsCapacity
1 parent 57762ed commit cb70b24

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main/java/org/glavo/nbt/tag/ParentTag.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected ParentTag(String name) {
7373
protected abstract void preUpdateSubTagName(Tag tag, String oldName, String newName) throws IllegalArgumentException;
7474

7575
protected final void ensureTagsCapacity(int minCapacity) {
76-
if (minCapacity >= tags.length) {
76+
if (minCapacity > tags.length) {
7777
tags = Arrays.copyOf(tags, ArrayAccessor.nextCapacity(tags.length, minCapacity));
7878
}
7979
}

0 commit comments

Comments
 (0)