From df979115a5f8e702ead7ea5261ef158dfb57b6be Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 22 Feb 2006 23:18:12 +0000 Subject: [PATCH] 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 --- cmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ); } /* -- 2.39.2