From 0b52a2f2465a66bcee9ad5b63d11597554e61bb9 Mon Sep 17 00:00:00 2001 From: prozessorkern Date: Wed, 26 Jun 2019 21:54:15 +0200 Subject: [PATCH] use the right pointer to insert the new command fix #12 --- src/shellmatta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shellmatta.c b/src/shellmatta.c index 97d646e..01e372c 100644 --- a/src/shellmatta.c +++ b/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; } }