Skip to content

Commit 0240350

Browse files
tghosgororgads
authored andcommitted
Make <nop> override the call::last_action_result only if it is a failure
Otherwise it clears the failure flag from the call even if a previous action failed.
1 parent 87b18d2 commit 0240350

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/call.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1897,7 +1897,11 @@ bool call::executeMessage(message *curmsg)
18971897
callDebug("Executing NOP at index %d.\n", curmsg->index);
18981898
do_bookkeeping(curmsg);
18991899
actionResult = executeAction(nullptr, curmsg);
1900-
last_action_result = actionResult;
1900+
if (actionResult != call::E_AR_NO_ERROR) {
1901+
// Store last action result if it is an error
1902+
// and go on with the scenario
1903+
call::last_action_result = actionResult;
1904+
}
19011905
if (actionResult == E_AR_RTPECHO_ERROR)
19021906
{
19031907
terminate(CStat::E_CALL_FAILED);

0 commit comments

Comments
 (0)