1
0
Fork 0
forked from fte/fteqw

Whilst this doesn't help runtime, it certainly helps gcc. whatever you do, don't crash menus for a bit.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@616 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-10 05:11:46 +00:00
parent 9611c2acc3
commit 012d89db37

View file

@ -1408,12 +1408,12 @@ char *SaveCallStack (progfuncs_t *progfuncs, char *s)
sprintf(buffer, "\t\tofs%i %i // %f\n", f->parm_start+arg, *(int *)(globalbase - f->locals+arg), *(float *)(globalbase - f->locals+arg) ); sprintf(buffer, "\t\tofs%i %i // %f\n", f->parm_start+arg, *(int *)(globalbase - f->locals+arg), *(float *)(globalbase - f->locals+arg) );
else else
{ {
__try //__try
{ //{
if (local->type == ev_entity) if (local->type == ev_entity)
{ //go safly. { //go safly.
int n; int n;
sprintf(buffer, "\t\t\"%s\"\t\"entity INVALID POINTER\"\n", local->s_name, n); sprintf(buffer, "\t\t\"%s\"\t\"entity INVALID POINTER\"\n", local->s_name);
for (n = 0; n < sv_num_edicts; n++) for (n = 0; n < sv_num_edicts; n++)
{ {
if (prinst->edicttable[n] == (struct edict_s *)PROG_TO_EDICT(((eval_t*)(globalbase - f->locals+arg))->edict)) if (prinst->edicttable[n] == (struct edict_s *)PROG_TO_EDICT(((eval_t*)(globalbase - f->locals+arg))->edict))
@ -1425,11 +1425,11 @@ __try
} }
else else
sprintf(buffer, "\t\t\"%s\"\t\"%s\"\n", local->s_name, PR_ValueString(progfuncs, local->type, (eval_t*)(globalbase - f->locals+arg))); sprintf(buffer, "\t\t\"%s\"\t\"%s\"\n", local->s_name, PR_ValueString(progfuncs, local->type, (eval_t*)(globalbase - f->locals+arg)));
} //}
__except(EXCEPTION_EXECUTE_HANDLER) //__except(EXCEPTION_EXECUTE_HANDLER)
{ //{
sprintf(buffer, "\t\t\"%s\" \"ILLEGAL POINTER\"\n", local->s_name); // sprintf(buffer, "\t\t\"%s\" \"ILLEGAL POINTER\"\n", local->s_name);
} //}
if (local->type == ev_vector) if (local->type == ev_vector)
arg+=2; arg+=2;
} }
@ -2443,19 +2443,20 @@ retry:
{ {
file = PRHunkAlloc(progfuncs, len+1); file = PRHunkAlloc(progfuncs, len+1);
if (externs->ReadFile(lnoname, file, len+1)) if (externs->ReadFile(lnoname, file, len+1))
if ( file[0] != lnotype
|| file[1] != version
|| file[2] != pr_progs->numglobaldefs
|| file[3] != pr_progs->numglobals
|| file[4] != pr_progs->numfielddefs
|| file[5] != pr_progs->numstatements
)
{ {
PRHunkFree(progfuncs, ohm); //whoops: old progs or incompatable if ( file[0] != lnotype
|| file[1] != version
|| file[2] != pr_progs->numglobaldefs
|| file[3] != pr_progs->numglobals
|| file[4] != pr_progs->numfielddefs
|| file[5] != pr_progs->numstatements
)
{
PRHunkFree(progfuncs, ohm); //whoops: old progs or incompatable
}
else
pr_linenums = file + 6;
} }
else
pr_linenums = file + 6;
} }
} }