From: havoc Date: Wed, 27 Feb 2008 08:43:29 +0000 (+0000) Subject: fix toggle command's error message for cvars that are not found (thanks X-Git-Tag: xonotic-v0.1.0preview~2382 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f93d8b25f255024588021b909730065894f7d820;p=xonotic%2Fdarkplaces.git fix toggle command's error message for cvars that are not found (thanks to metlslime for reporting this) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8140 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cmd.c b/cmd.c index c085aa88..b60ae285 100644 --- a/cmd.c +++ b/cmd.c @@ -413,7 +413,7 @@ static void Cmd_Toggle_f(void) } else { // Invalid CVar - Con_Printf("ERROR : CVar '%s' not found\n", Cmd_Argv(2) ); + Con_Printf("ERROR : CVar '%s' not found\n", Cmd_Argv(1) ); } } } @@ -829,7 +829,7 @@ static void Cmd_ExecuteAlias (cmdalias_t *alias) Cmd_PreprocessString( alias->value, buffer, sizeof(buffer) - 2, alias ); // insert at start of command buffer, so that aliases execute in order // (fixes bug introduced by Black on 20050705) - + // Note: Cbuf_PreprocessString will be called on this string AGAIN! So we // have to make sure that no second variable expansion takes place, otherwise // alias parameters containing dollar signs can have bad effects.