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:
parent
6cc587e8e8
commit
79c1f23370
1 changed files with 11 additions and 2 deletions
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue