about summary refs log tree commit diff stats
path: root/src/LYDownload.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/LYDownload.c')
-rw-r--r--src/LYDownload.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/LYDownload.c b/src/LYDownload.c
index 65b27de4..c446e563 100644
--- a/src/LYDownload.c
+++ b/src/LYDownload.c
@@ -414,9 +414,11 @@ check_recall:
 	     *	It actually is not a bug at all and does as it should,
 	     *	putting both names on the command line.
 	     */
-	    HTAddParam(&the_command, download_command->command, 1, file);
-	    HTAddParam(&the_command, download_command->command, 2, buffer);
-	    HTEndParam(&the_command, download_command->command, 2);
+	    count = 1;
+	    HTAddParam(&the_command, download_command->command, count, file);
+	    if (HTCountCommandArgs(download_command->command) > 1) 
+		HTAddParam(&the_command, download_command->command, ++count, buffer);
+	    HTEndParam(&the_command, download_command->command, count);
 
 	} else {
 	    HTAlert(MISCONF_DOWNLOAD_COMMAND);