mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-01-18 21:51:37 +00:00
Fix command line variables not being set correctly
+seta, +sets, and +setu were ignored because Com_AddStartupCommands thought Com_StartupVariable handled it. +set didn't allow value to be multiple tokens which due to Unix shell unintuitively removing quotes causes the variable to only be set to the first token. This could be worked around by escaping quotes ioq3ded +set g_motd \"hello world\" but it doesn't match behavior of other start up commands (which now includes seta, sets, and setu) that use all tokens.
This commit is contained in:
parent
da747fc291
commit
313064baa4
1 changed files with 3 additions and 3 deletions
|
@ -491,9 +491,9 @@ void Com_StartupVariable( const char *match ) {
|
|||
if(!match || !strcmp(s, match))
|
||||
{
|
||||
if(Cvar_Flags(s) == CVAR_NONEXISTENT)
|
||||
Cvar_Get(s, Cmd_Argv(2), CVAR_USER_CREATED);
|
||||
Cvar_Get(s, Cmd_ArgsFrom(2), CVAR_USER_CREATED);
|
||||
else
|
||||
Cvar_Set2(s, Cmd_Argv(2), qfalse);
|
||||
Cvar_Set2(s, Cmd_ArgsFrom(2), qfalse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -522,7 +522,7 @@ qboolean Com_AddStartupCommands( void ) {
|
|||
}
|
||||
|
||||
// set commands already added with Com_StartupVariable
|
||||
if ( !Q_stricmpn( com_consoleLines[i], "set", 3 ) ) {
|
||||
if ( !Q_stricmpn( com_consoleLines[i], "set ", 4 ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue