Compare commits
2 Commits
3b3761faa9
...
df2129a1bb
| Author | SHA1 | Date | |
|---|---|---|---|
| df2129a1bb | |||
| e7ea706157 |
@ -68,7 +68,7 @@ bool CLI_deinit()
|
||||
|
||||
FIFOBuffChar_delete(FIFO);
|
||||
#ifdef HISTORY
|
||||
History_deinit(History);
|
||||
History_deinit(History, true);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ int CMDList_add(CMDList_t *list, CMD_t* cmd, char* cmdName)
|
||||
read_p = cmd->cmd;
|
||||
}
|
||||
|
||||
while (returnCode == 0)
|
||||
while (returnCode >= 0)
|
||||
{
|
||||
char c = *read_p & (~0x20); // convert to uppercase
|
||||
if ((c >= 'A') && (c <= 'Z'))
|
||||
|
||||
@ -19,7 +19,7 @@ History_t* History_init()
|
||||
}
|
||||
|
||||
|
||||
int History_deinit(History_t* history)
|
||||
int History_deinit(History_t* history, bool freeLines)
|
||||
{
|
||||
// Check if the buffer there is something in the buffer
|
||||
if (history->FirstEl_p == NULL)
|
||||
@ -29,6 +29,10 @@ int History_deinit(History_t* history)
|
||||
while (el != NULL)
|
||||
{
|
||||
History_element_t* nextEl = el->nextEl_p;
|
||||
if (freeLines)
|
||||
{
|
||||
free(el->line);
|
||||
}
|
||||
free(el);
|
||||
el = nextEl;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user