From c7d9b1c15800c93f24e9a132cf25764d5c88a120 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 7 Sep 2005 09:58:37 +0000 Subject: [PATCH] fix a crash in Cmd_ExecuteAlias when $* is used with no parameters git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5692 d7cf8633-e32d-0410-b094-e92efae38249 --- cmd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd.c b/cmd.c index 24ef9529..ee08ff9b 100644 --- a/cmd.c +++ b/cmd.c @@ -430,9 +430,11 @@ static void Cmd_ExecuteAlias (cmdalias_t *alias) { const char *linein = Cmd_Args(); // include all params - while( *linein && outlen < ALIAS_BUFFER ) { - *out++ = *linein++; - outlen++; + if (linein) { + while( *linein && outlen < ALIAS_BUFFER ) { + *out++ = *linein++; + outlen++; + } } in++; -- 2.39.2