Skip to content

Commit

Permalink
Make <nop> override the call::last_action_result only if it is a failure
Browse files Browse the repository at this point in the history
Otherwise it clears the failure flag from the call even if a previous action failed.
  • Loading branch information
tghosgor authored and orgads committed Nov 3, 2024
1 parent 87b18d2 commit 0240350
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,11 @@ bool call::executeMessage(message *curmsg)
callDebug("Executing NOP at index %d.\n", curmsg->index);
do_bookkeeping(curmsg);
actionResult = executeAction(nullptr, curmsg);
last_action_result = actionResult;
if (actionResult != call::E_AR_NO_ERROR) {
// Store last action result if it is an error
// and go on with the scenario
call::last_action_result = actionResult;
}
if (actionResult == E_AR_RTPECHO_ERROR)
{
terminate(CStat::E_CALL_FAILED);
Expand Down

0 comments on commit 0240350

Please sign in to comment.