Skip to content

Commit 32acf17

Browse files
committed
Fix am_fsm_ctor() bug
1 parent 5a19377 commit 32acf17

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libs/fsm/fsm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ bool am_fsm_is_in(const struct am_fsm *fsm, const am_fsm_state_fn state) {
110110
void am_fsm_ctor(struct am_fsm *fsm, const am_fsm_state_fn state) {
111111
AM_ASSERT(fsm);
112112
AM_ASSERT(state);
113+
memset(fsm, 0, sizeof(*fsm));
113114
fsm->state = state;
114115
}
115116

0 commit comments

Comments
 (0)