[openjk] 18/32: [MP/SP] Merge ioquake/ioq3 at 313064baa4869888015471a6d827bb015dab9b46

Simon McVittie smcv at debian.org
Sun Mar 12 18:03:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository openjk.

commit a9620751d1b77a4144833aa4818ac06b075be480
Author: Ensiform <ensiform at gmail.com>
Date:   Sat Mar 11 12:30:53 2017 -0600

    [MP/SP] Merge ioquake/ioq3 at 313064baa4869888015471a6d827bb015dab9b46
    
    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.
---
 code/qcommon/common.cpp   | 4 ++--
 codemp/qcommon/common.cpp | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/code/qcommon/common.cpp b/code/qcommon/common.cpp
index 031e2b3..135f6d7 100644
--- a/code/qcommon/common.cpp
+++ b/code/qcommon/common.cpp
@@ -426,9 +426,9 @@ void Com_StartupVariable( const char *match ) {
 		if(!match || !strcmp(s, match))
 		{
 			if((unsigned)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);
 		}
 	}
 }
diff --git a/codemp/qcommon/common.cpp b/codemp/qcommon/common.cpp
index 3011c8d..139a0f7 100644
--- a/codemp/qcommon/common.cpp
+++ b/codemp/qcommon/common.cpp
@@ -417,7 +417,7 @@ void Com_StartupVariable( const char *match ) {
 		char *s = Cmd_Argv(1);
 
 		if ( !match || !strcmp( s, match ) )
-			Cvar_User_Set( s, Cmd_Argv( 2 ) );
+			Cvar_User_Set( s, Cmd_ArgsFrom( 2 ) );
 	}
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openjk.git



More information about the Pkg-games-commits mailing list