浏览代码

use the right pointer to insert the new command fix #12

prozessorkern 5 年之前
父节点
当前提交
0b52a2f246
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/shellmatta.c

+ 1 - 1
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;
             }
         }