From 5fc17e0c116ad2a7766a11e68df8b0ee205ddc00 Mon Sep 17 00:00:00 2001 From: asofold Date: Sun, 2 Dec 2012 17:49:18 +0100 Subject: [PATCH] Fixes after fast commits. --- src/fr/neatmonster/nocheatplus/event/GenericListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fr/neatmonster/nocheatplus/event/GenericListener.java b/src/fr/neatmonster/nocheatplus/event/GenericListener.java index dcfc880e..d86646af 100644 --- a/src/fr/neatmonster/nocheatplus/event/GenericListener.java +++ b/src/fr/neatmonster/nocheatplus/event/GenericListener.java @@ -160,11 +160,11 @@ public class GenericListener implements Listener, EventExecutor final MethodEntry[] newEntries; if (insertion == entries.length || insertion == -1){ newEntries = Arrays.copyOf(entries, entries.length + 1); - newEntries[entries.length - 1] = entry; + newEntries[newEntries.length - 1] = entry; } else{ newEntries = new MethodEntry[entries.length + 1]; - for (int i = 0; i < entries.length + 1; i ++ ){ + for (int i = 0; i < newEntries.length; i ++ ){ if (i < insertion) newEntries[i] = entries[i]; else if (i == insertion) newEntries[i] = entry; else{