Skip to content

Commit

Permalink
Fix ArrayList.removeElements
Browse files Browse the repository at this point in the history
  • Loading branch information
mouse0w0 committed Jul 22, 2024
1 parent e67b24f commit 4421a0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drv/ArrayList.drv
Original file line number Diff line number Diff line change
Expand Up @@ -835,10 +835,11 @@ public class ARRAY_LIST KEY_GENERIC extends ABSTRACT_LIST KEY_GENERIC implements
it.unimi.dsi.fastutil.Arrays.ensureFromTo(size, from, to);
final KEY_TYPE[] a = this.a;
System.arraycopy(a, to, a, from, size - to);
final int newSize = size - (to - from);
#if KEYS_REFERENCE
Arrays.fill(a, to, size, null);
for (int i = newSize; i < size; i++) a[i] = null;
#endif
this.size -= (to - from);
this.size = newSize;
}


Expand Down

0 comments on commit 4421a0f

Please sign in to comment.