From: divverent Date: Sun, 11 Dec 2011 12:42:44 +0000 (+0000) Subject: if no varfunc is left, NULL it X-Git-Tag: xonotic-v0.6.0~102^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=23cf09777969ae0150ffd414ee8fc576526a77fa;p=xonotic%2Fdarkplaces.git if no varfunc is left, NULL it git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11611 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cmd.c b/cmd.c index 51e946b2..651d08e2 100644 --- 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] == '$')