X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fui%2Fstdin%2FDownloadCommand.java;h=75e92caf9cada369d59b790488f2564c4b4a9c77;hb=69d9f0cd50fe26dd878be3d21facd3199c72f445;hp=2fdec0d78b551ac4ee9309beceb1c8596db1d077;hpb=1ca482cdf4956eb7dcdcfd75c4d0412cf0261fdf;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/xdcc/ui/stdin/DownloadCommand.java b/src/main/java/net/pterodactylus/xdcc/ui/stdin/DownloadCommand.java index 2fdec0d..75e92ca 100644 --- a/src/main/java/net/pterodactylus/xdcc/ui/stdin/DownloadCommand.java +++ b/src/main/java/net/pterodactylus/xdcc/ui/stdin/DownloadCommand.java @@ -65,6 +65,9 @@ public class DownloadCommand implements Command { @Override public State execute(State state, List parameters, Writer outputWriter) throws IOException { + if (parameters.isEmpty()) { + return state; + } Integer index = Ints.tryParse(parameters.get(0)); if ((index != null) && (index < state.getLastResults().size())) { core.fetch(state.getLastResults().get(index).bot(), state.getLastResults().get(index).pack());