mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 20:21:38 +00:00
remove -basedir handling. wrong idea, bad implementation (fixed size MALLOC?!?)
This commit is contained in:
parent
aad43f6d00
commit
ed9ca01ada
1 changed files with 1 additions and 23 deletions
24
source/cmd.c
24
source/cmd.c
|
@ -300,7 +300,7 @@ void Cmd_StuffCmds_f (void)
|
|||
return;
|
||||
|
||||
// pull out the commands
|
||||
build = malloc (s+21); // LordHavoc: +21 instead of +1 to account for potential basedir expansion
|
||||
build = malloc (s+1);
|
||||
build[0] = 0;
|
||||
|
||||
for (i=0 ; i<s-1 ; i++)
|
||||
|
@ -322,28 +322,6 @@ void Cmd_StuffCmds_f (void)
|
|||
com_cmdline[j] = c;
|
||||
i = j-1;
|
||||
}
|
||||
// LordHavoc: added -basedir back, though I don't think this is the best place, or the most ideal way...
|
||||
else if (com_cmdline[i] == '-')
|
||||
{
|
||||
i++;
|
||||
|
||||
for (j=i ; ((com_cmdline[j] != '+')
|
||||
&& (com_cmdline[j] != '-')
|
||||
&& (com_cmdline[j] != 0)) ; j++)
|
||||
;
|
||||
|
||||
c = com_cmdline[j];
|
||||
com_cmdline[j] = 0;
|
||||
|
||||
if (strncmp(com_cmdline+i,"basedir ", 8)==0)
|
||||
{
|
||||
strcat (build, "set fs_userpath ");
|
||||
strcat (build, com_cmdline+i+8);
|
||||
strcat (build, "\n");
|
||||
}
|
||||
com_cmdline[j] = c;
|
||||
i = j-1;
|
||||
}
|
||||
}
|
||||
|
||||
//Con_Printf("[\n%s]\n",build);
|
||||
|
|
Loading…
Reference in a new issue