Create correctly sized array.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 8 Apr 2013 19:54:25 +0000 (21:54 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 8 Apr 2013 19:54:25 +0000 (21:54 +0200)
src/main/java/net/pterodactylus/irc/Connection.java

index 0e7c461..ba4e283 100644 (file)
@@ -446,7 +446,7 @@ public class Connection extends AbstractExecutionThreadService implements Servic
                                        setParameters.add(maybeSetParameter.get());
                                }
                        }
-                       sendCommand(command, setParameters.toArray(new String[0]));
+                       sendCommand(command, setParameters.toArray(new String[setParameters.size()]));
                }
 
                /**