]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
if no varfunc is left, NULL it
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Dec 2011 12:42:44 +0000 (12:42 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 12 Dec 2011 06:15:43 +0000 (07:15 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11611 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=23cf09777969ae0150ffd414ee8fc576526a77fa

cmd.c

diff --git a/cmd.c b/cmd.c
index 51e946b299b54248eb2dea7c963cf401891f2516..651d08e2269eb6b7cedcfba78e7707f51369ee14 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -968,6 +968,9 @@ static const char *Cmd_GetCvarValue(const char *var, size_t varlen, cmdalias_t *
                {
                        memmove(p, p+1, strlen(p)); // with final NUL
                }
+               // if no function is left, NULL it
+               if(!*varfunc)
+                       varfunc = NULL;
        }
 
        if(varname[0] == '$')