fix for getstatf with 2 params

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2628 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2007-09-01 02:09:54 +00:00
parent 1c41a5c11a
commit c0b1291df8
1 changed files with 4 additions and 1 deletions

View File

@ -1168,7 +1168,10 @@ static void PF_cs_getstati(progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
int first, count;
first = G_FLOAT(OFS_PARM1);
count = G_FLOAT(OFS_PARM2);
if (*prinst->callargc > 2)
count = G_FLOAT(OFS_PARM2);
else
count = 1;
G_FLOAT(OFS_RETURN) = (((unsigned int)val)&(((1<<count)-1)<<first))>>first;
}
else