Skip to content

Commit 58f5bd9

Browse files
committed
Fix CompoundTag index update when removing tags
1 parent 758aa81 commit 58f5bd9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void remove(Tag tag) {
113113

114114
// Update the index of the successor tags.
115115
for (int i = subtagIndex; i < subTags.size(); i++) {
116-
subTags.get(i).index--;
116+
subTags.get(i).index = i;
117117
}
118118
}
119119

0 commit comments

Comments
 (0)