mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
skip start params when parsing argv in console
This commit is contained in:
parent
eace936869
commit
9e39239ce2
|
@ -497,11 +497,23 @@ void CConsole::ParseArguments(int NumArgs, const char **ppArguments)
|
|||
for(int i = 0; i < NumArgs; i++)
|
||||
{
|
||||
// check for scripts to execute
|
||||
if(ppArguments[i][0] == '-' && ppArguments[i][1] == 'f' && ppArguments[i][2] == 0 && NumArgs - i > 1)
|
||||
if(ppArguments[i][0] == '-' && ppArguments[i][1] == 'f' && ppArguments[i][2] == 0)
|
||||
{
|
||||
ExecuteFile(ppArguments[i+1]);
|
||||
if(NumArgs - i > 1)
|
||||
ExecuteFile(ppArguments[i+1]);
|
||||
i++;
|
||||
}
|
||||
else if(!str_comp("-s", ppArguments[i]) || !str_comp("--silent", ppArguments[i]))
|
||||
{
|
||||
// skip silent param
|
||||
continue;
|
||||
}
|
||||
else if(ppArguments[i][0] == '-' && ppArguments[i][1] == 'd' && ppArguments[i][2] == 0)
|
||||
{
|
||||
// skip datadir param
|
||||
++i;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// search arguments for overrides
|
||||
|
|
Loading…
Reference in a new issue