Cleans up better on a runaway loop error.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@716 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-01-04 08:18:03 +00:00
parent 6cc587e8e8
commit 79c1f23370

View file

@ -559,7 +559,7 @@ int PR_ToggleBreakpoint(progfuncs_t *progfuncs, char *filename, int linenum, int
for (f = pr_progstate[pn].functions, fl = 0; fl < pr_progstate[pn].progs->numfunctions; f++, fl++)
{
if (!strcmp(f->s_file, filename))
if (!stricmp(f->s_file, filename))
{
for (i = f->first_statement; ; i++)
{
@ -778,7 +778,16 @@ void PR_ExecuteCode (progfuncs_t *progfuncs, int s)
prinst->continuestatement = -1;
#define PRBOUNDSCHECK
#define RUNAWAYCHECK() if (!--runaway) { pr_xstatement = st-pr_statements; PR_StackTrace(progfuncs); printf ("runaway loop error"); pr_depth = prinst->exitdepth;return;}
#define RUNAWAYCHECK() \
if (!--runaway) \
{ \
pr_xstatement = st-pr_statements; \
PR_StackTrace(progfuncs); \
printf ("runaway loop error"); \
while(pr_depth > prinst->exitdepth) \
PR_LeaveFunction(progfuncs); \
return; \
}
#define OPA ((eval_t *)&glob[st->a])
#define OPB ((eval_t *)&glob[st->b])