Fixed a crash when autocompleting a player's name near a Corporea Index.

This commit is contained in:
Vasco Lavos committed 2015-12-25 04:31:48 +00:00
1 parent c1faf6ac97
commit 493664317b
1 file changed
+5 -1
@@ -142,8 +142,12 @@ public class CorporeaAutoCompleteHandler {
}
private ArrayList<CompletionData> getNames(String prefix) {
String s = prefix.trim();
if(s.isEmpty())
return new ArrayList();
TreeSet<CompletionData> result = new TreeSet<CompletionData>();
String[] words = prefix.split(" ");
String[] words = s.split(" ");
int i = words.length - 1;
String curPrefix = words[i];
while(i >= 0) {