mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-10 14:20:38 +00:00
fix command line parsing when - is embeded in an arg (eg +gamedir artifact-rjs)
This commit is contained in:
parent
32910a1b5f
commit
316b74eddc
5 changed files with 9 additions and 3 deletions
|
@ -310,9 +310,10 @@ Cmd_StuffCmds_f (void)
|
|||
if (com_cmdline[i] == '+') {
|
||||
i++;
|
||||
|
||||
for (j = i; ((com_cmdline[j] != '+')
|
||||
&& (com_cmdline[j] != '-')
|
||||
&& (com_cmdline[j] != 0)); j++);
|
||||
for (j = i; !((com_cmdline[j] == '+')
|
||||
|| (com_cmdline[j] == '-'
|
||||
&& (j==0 || com_cmdline[j - 1] == ' '))
|
||||
|| (com_cmdline[j] == 0)); j++);
|
||||
|
||||
c = com_cmdline[j];
|
||||
com_cmdline[j] = 0;
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include "cmd.h"
|
||||
#include "console.h"
|
||||
#include "glquake.h"
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include "cl_parse.h"
|
||||
#include "console.h"
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include "r_local.h"
|
||||
#include "sys.h"
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include "qendian.h"
|
||||
#include "quakefs.h"
|
||||
|
|
Loading…
Reference in a new issue