rhamph's deadbeaf locals patch as-is :)

This commit is contained in:
Bill Currie 2001-08-13 20:29:33 +00:00
parent 31a560cc3f
commit 45fd3e084d
2 changed files with 8 additions and 1 deletions

View file

@ -1361,7 +1361,7 @@ PR_Init_Cvars (void)
Cvar_Get ("pr_boundscheck", "1", CVAR_NONE, NULL,
"Server progs bounds checking");
pr_deadbeef = Cvar_Get ("pr_deadbeef", "0", CVAR_NONE, NULL,
"set to clear unallocated memory ot 0xdeadbeef");
"set to clear unallocated memory to 0xdeadbeef");
PR_Debug_Init_Cvars ();
}

View file

@ -48,6 +48,8 @@
//=============================================================================
extern cvar_t *pr_deadbeef;
/*
PR_PrintStatement
*/
@ -196,6 +198,7 @@ int
PR_EnterFunction (progs_t * pr, dfunction_t *f)
{
int i, j, c, o;
// int k;
//printf("%s:\n", PR_GetString(pr,f->s_name));
pr->pr_stack[pr->pr_depth].s = pr->pr_xstatement;
@ -214,6 +217,10 @@ PR_EnterFunction (progs_t * pr, dfunction_t *f)
sizeof (pr_type_t) * c);
pr->localstack_used += c;
// if (pr_deadbeef->int_val)
// for (k = f->parm_start; k < f->parm_start + c; k++)
// pr->pr_globals[k].integer_var = 0xdeadbeef;
// copy parameters
o = f->parm_start;
for (i = 0; i < f->numparms; i++) {