@@ -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;