diff --git a/src/shellmatta.c b/src/shellmatta.c index 97d646e..01e372c 100644 --- a/src/shellmatta.c +++ b/src/shellmatta.c @@ -166,7 +166,7 @@ shellmatta_retCode_t shellmatta_addCmd(shellmatta_handle_t handle, shellmatta_cm { /* nothing to do */ } - prevCmd = &tempCmd; + prevCmd = &(tempCmd->next); tempCmd = tempCmd->next; } }