Skip to content
Snippets Groups Projects
Commit 07426fec authored by deuce's avatar deuce
Browse files

When parsing the command-line, remove arguments from argv/argc as they are

handled.
parent c697e428
No related branches found
No related tags found
No related merge requests found
......@@ -833,21 +833,35 @@ var dk = {
case '-t':
case '-telnet':
this.connection.telnet = true;
argv.splice(i, 1);
argc--;
i--;
break;
case '-s':
case '-socket':
if (i+1 < argc)
this.connection.socket = argv[++i];
if (i+1 < argc) {
this.connection.socket = argv[i+1];
argv.splice(i, 2);
argc-=2;
i--;
}
break;
case '-l':
case '-local':
this.console.local = true;
this.console.remote = false;
argv.splice(i, 1);
argc--;
i--;
break;
case '-d':
case '-dropfile':
if (i+1 < argc)
this.parse_dropfile(argv[++i]);
if (i+1 < argc) {
this.parse_dropfile(argv[i+1]);
argv.splice(i, 2);
argc-=2;
i--;
}
break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment