]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix a crash in Cmd_ExecuteAlias when $* is used with no parameters
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 7 Sep 2005 09:58:37 +0000 (09:58 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 7 Sep 2005 09:58:37 +0000 (09:58 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5692 d7cf8633-e32d-0410-b094-e92efae38249

cmd.c

diff --git a/cmd.c b/cmd.c
index 24ef95292c81079bb01fb00598620739bbcdbbf7..ee08ff9beea9e242722650b8277924531beba236 100644 (file)
--- 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++;