From: havoc Date: Wed, 22 Feb 2006 23:18:12 +0000 (+0000) Subject: fix alias execution order bug introduced by Black on 20050705 (using Cbuf_AddText... X-Git-Tag: xonotic-v0.1.0preview~4307 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=df979115a5f8e702ead7ea5261ef158dfb57b6be;p=xonotic%2Fdarkplaces.git fix alias execution order bug introduced by Black on 20050705 (using Cbuf_AddText instead of Cbuf_InsertText for alias expansion is bad!) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6004 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cmd.c b/cmd.c index bc09a50d..2af8f84c 100644 --- a/cmd.c +++ b/cmd.c @@ -502,7 +502,9 @@ static void Cmd_ExecuteAlias (cmdalias_t *alias) { static char buffer[ MAX_INPUTLINE + 2 ]; Cmd_PreprocessString( alias->value, buffer, sizeof(buffer) - 2, alias ); - Cbuf_AddText( buffer ); + // insert at start of command buffer, so that aliases execute in order + // (fixes bug introduced by Black on 20050705) + Cbuf_InsertText( buffer ); } /*