SCP: Fix expect exit behavior to not be a reason a DO command procedure exits.

The exploit purpose of an EXPECT command is to return control to the SCP
interpreter when data output matches the expect condition;  This will then
allow either related action commands specified on the EXCEPT command to
be performed or subsequent commands in the running command file.
This commit is contained in:
Mark Pizzolato 2016-03-15 14:48:53 -07:00
parent 95d2365c52
commit f71acb307d

2
scp.c
View file

@ -2825,6 +2825,8 @@ do {
stat_nomessage = stat & SCPE_NOMESSAGE; /* extract possible message supression flag */ stat_nomessage = stat & SCPE_NOMESSAGE; /* extract possible message supression flag */
stat_nomessage = stat_nomessage || (!sim_show_message);/* Apply global suppression */ stat_nomessage = stat_nomessage || (!sim_show_message);/* Apply global suppression */
stat = SCPE_BARE_STATUS(stat); /* remove possible flag */ stat = SCPE_BARE_STATUS(stat); /* remove possible flag */
if (stat == SCPE_EXPECT) /* EXPECT status is non actionable */
stat = SCPE_OK; /* so adjust it to SCPE_OK */
if ((stat != SCPE_OK) || if ((stat != SCPE_OK) ||
((cmdp->action != &return_cmd) && ((cmdp->action != &return_cmd) &&
(cmdp->action != &goto_cmd) && (cmdp->action != &goto_cmd) &&