Преглед изворни кода

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