Don't crash on string stats.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3092 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
8fb77f7301
commit
493fdd453d
1 changed files with 6 additions and 2 deletions
|
@ -1462,7 +1462,11 @@ static void PF_cs_getstati(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
static void PF_cs_getstats(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
int stnum = G_FLOAT(OFS_PARM0);
|
||||
char out[8];
|
||||
|
||||
RETURN_TSTRING(cl.statsstr[csqc_lplayernum][stnum]);
|
||||
|
||||
/*
|
||||
char out[17];
|
||||
|
||||
//the network protocol byteswaps
|
||||
|
||||
|
@ -1472,7 +1476,7 @@ static void PF_cs_getstats(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
((unsigned int*)out)[3] = LittleLong(cl.stats[csqc_lplayernum][stnum+3]);
|
||||
((unsigned int*)out)[4] = 0; //make sure it's null terminated
|
||||
|
||||
RETURN_TSTRING(out);
|
||||
RETURN_TSTRING(out);*/
|
||||
}
|
||||
|
||||
static void PF_cs_SetOrigin(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
|
|
Loading…
Reference in a new issue