Fixed regression in handling (ignoring) error conditions while processing simple do file.

This commit is contained in:
Mark Pizzolato 2012-03-26 04:59:46 -07:00
parent 027c921cfc
commit 8cc2ef03c7

12
scp.c
View file

@ -1018,10 +1018,11 @@ do {
} }
if (*cptr == 0) /* ignore blank */ if (*cptr == 0) /* ignore blank */
continue; continue;
if (echo) /* echo if -v */ if (echo) { /* echo if -v */
printf("do> %s\n", cptr); printf("do> %s\n", cptr);
if (echo && sim_log) if (sim_log)
fprintf (sim_log, "do> %s\n", cptr); fprintf (sim_log, "do> %s\n", cptr);
}
if (*cptr == ':') /* ignore label */ if (*cptr == ':') /* ignore label */
continue; continue;
cptr = get_glyph (cptr, gbuf, 0); /* get command glyph */ cptr = get_glyph (cptr, gbuf, 0); /* get command glyph */
@ -1058,9 +1059,6 @@ do {
stat = stat & ~SCPE_DOFAILED; /* remove possible flag */ stat = stat & ~SCPE_DOFAILED; /* remove possible flag */
} }
switch (stat) { switch (stat) {
case SCPE_OK:
case SCPE_STEP:
break;
case SCPE_AFAIL: case SCPE_AFAIL:
staying = (sim_on_check[sim_do_depth] && /* if trap action defined */ staying = (sim_on_check[sim_do_depth] && /* if trap action defined */
sim_on_actions[sim_do_depth][stat]); /* use it, otherwise exit */ sim_on_actions[sim_do_depth][stat]); /* use it, otherwise exit */
@ -1068,8 +1066,10 @@ do {
case SCPE_EXIT: case SCPE_EXIT:
staying = FALSE; staying = FALSE;
break; break;
case SCPE_OK:
case SCPE_STEP:
break;
default: default:
staying = sim_on_check[sim_do_depth];
break; break;
} }
if ((staying || !interactive) && /* report error if staying */ if ((staying || !interactive) && /* report error if staying */