소스 검색

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