diff --git a/src/fr/neatmonster/nocheatplus/checks/chat/analysis/ds/LookupTree.java b/src/fr/neatmonster/nocheatplus/checks/chat/analysis/ds/LookupTree.java index e0d63b4b..d571c265 100644 --- a/src/fr/neatmonster/nocheatplus/checks/chat/analysis/ds/LookupTree.java +++ b/src/fr/neatmonster/nocheatplus/checks/chat/analysis/ds/LookupTree.java @@ -26,7 +26,7 @@ public class LookupTree>{ public Node getChild(final K key, final NodeFactory> factory){ if (children == null){ - if (factory != null) children = new HashMap>(); + if (factory != null) children = new HashMap>(3); else return null; } Node node = children.get(key); @@ -108,9 +108,12 @@ public class LookupTree>{ depth ++; } } - if (create || insertion.isEnd && depth == keys.size()){ + if (create){ + node = current; + current.isEnd = true; + } + else if (depth == keys.size()){ node = current; - if (insertion != current) current.isEnd = true; } return new LookupEntry(node, insertion, depth); }