From 486e29fa506d793e89583c27620c296252f4287f Mon Sep 17 00:00:00 2001 From: mtangy Date: Wed, 10 Apr 2019 14:41:11 -0500 Subject: [PATCH] Change made to account for group state transitions when in a sub-state with 0 transitions --- src/stateMachine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stateMachine.c b/src/stateMachine.c index 25a8fc8..f0bf58a 100644 --- a/src/stateMachine.c +++ b/src/stateMachine.c @@ -50,7 +50,8 @@ int stateM_handleEvent( struct stateMachine *fsm, return stateM_errorStateReached; } - if ( !fsm->currentState->numTransitions ) + if ( !fsm->currentState->numTransitions && (!fsm->currentState->parentState || + (fsm->currentState->parentState && !fsm->currentState->parentState->numTransitions)) ) return stateM_noStateChange; struct state *nextState = fsm->currentState;