From f71acb307d3bdcfff6629dd0676d0cea47e8fb4f Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 15 Mar 2016 14:48:53 -0700 Subject: [PATCH] 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. --- scp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scp.c b/scp.c index 5ef3697b..5bf19add 100644 --- a/scp.c +++ b/scp.c @@ -2825,6 +2825,8 @@ do { stat_nomessage = stat & SCPE_NOMESSAGE; /* extract possible message supression flag */ stat_nomessage = stat_nomessage || (!sim_show_message);/* Apply global suppression */ 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) || ((cmdp->action != &return_cmd) && (cmdp->action != &goto_cmd) &&