diff --git a/src/fr/neatmonster/nocheatplus/utilities/ds/CoordMap.java b/src/fr/neatmonster/nocheatplus/utilities/ds/CoordMap.java index 76ccd675..4d6b814a 100644 --- a/src/fr/neatmonster/nocheatplus/utilities/ds/CoordMap.java +++ b/src/fr/neatmonster/nocheatplus/utilities/ds/CoordMap.java @@ -276,7 +276,7 @@ public class CoordMap { private final void resize(final int size) { // TODO: other capacity / allow to set strategy [also for reducing for long time use] - final int newCapacity = Math.max((int) ((size + 4) / loadFactor), entries.length + entries.length / 4); + final int newCapacity = Math.min(Math.max((int) ((size + 4) / loadFactor), entries.length + entries.length / 4), 4); @SuppressWarnings("unchecked") final List>[] newEntries = new List[newCapacity]; int used = -1; // Fill old buckets to fornt of old array.