Skip to content
Snippets Groups Projects
Commit 9bd9e667 authored by James R.'s avatar James R.
Browse files

Merge branch 'push-special-params' into 'master'

"+" command line parameters make sense

See merge request STJr/SRB2!707
parents 3ea51c94 ffc27464
No related branches found
No related tags found
1 merge request!707"+" command line parameters make sense
......@@ -92,36 +92,21 @@ const char *M_GetNextParm(void)
void M_PushSpecialParameters(void)
{
INT32 i;
char s[256];
boolean onetime = false;
for (i = 1; i < myargc; i++)
{
if (myargv[i][0] == '+')
{
strcpy(s, &myargv[i][1]);
COM_BufAddText(&myargv[i][1]);
i++;
// get the parameters of the command too
for (; i < myargc && myargv[i][0] != '+' && myargv[i][0] != '-'; i++)
{
strcat(s, " ");
if (!onetime)
{
strcat(s, "\"");
onetime = true;
}
strcat(s, myargv[i]);
}
if (onetime)
{
strcat(s, "\"");
onetime = false;
COM_BufAddText(va(" \"%s\"", myargv[i]));
}
strcat(s, "\n");
// push it
COM_BufAddText(s);
COM_BufAddText("\n");
i--;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment