mirror of https://github.com/Minestom/Minestom.git
Fix OOB when clearing path-able tag entries
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
d8cda624c8
commit
6c250de41c
|
@ -122,7 +122,12 @@ final class TagHandlerImpl implements TagHandler {
|
|||
}
|
||||
// Handle removal if the tag was present (recursively)
|
||||
if (value == null) {
|
||||
pathHandlers[length - 1].entries[tagIndex] = null;
|
||||
// Remove entry
|
||||
{
|
||||
Entry<?>[] finalEntries = pathHandlers[length - 1].entries;
|
||||
if (finalEntries.length >= tagIndex) finalEntries[tagIndex] = null;
|
||||
}
|
||||
// Clear empty parents
|
||||
boolean empty = false;
|
||||
for (int i = length - 1; i >= 0; i--) {
|
||||
TagHandlerImpl handler = pathHandlers[i];
|
||||
|
|
Loading…
Reference in New Issue