From c0b1291df823a8c3046984addb32c49b4f1ac786 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Sat, 1 Sep 2007 02:09:54 +0000 Subject: [PATCH] fix for getstatf with 2 params git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2628 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/pr_csqc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/client/pr_csqc.c b/engine/client/pr_csqc.c index 922a15c79..a607284d6 100644 --- a/engine/client/pr_csqc.c +++ b/engine/client/pr_csqc.c @@ -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<>first; } else