fsm_opt: Fix runtime error for FSMs without a reset state

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2019-02-07 10:35:36 +00:00
parent e112d2fbf5
commit a4515712cb
1 changed files with 2 additions and 1 deletions

View File

@ -72,6 +72,7 @@ struct FsmOpt
new_transition_table.swap(fsm_data.transition_table);
new_state_table.swap(fsm_data.state_table);
if (fsm_data.reset_state != -1)
fsm_data.reset_state = old_to_new_state.at(fsm_data.reset_state);
}
}