Преглед на файлове

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