mirror of
https://github.com/eddyem/eddys_snippets.git
synced 2026-03-20 00:30:59 +03:00
fixed bug in thread_array_management
This commit is contained in:
@@ -78,8 +78,9 @@ static char *popmessage(msglist **lst){
|
||||
if(!lst || !*lst) return NULL;
|
||||
char *ret;
|
||||
msglist *node = *lst;
|
||||
ret = (*lst)->data;
|
||||
*lst = (*lst)->next;
|
||||
if(node->next) node->next->last = node->last; // pop not last message
|
||||
ret = node->data;
|
||||
*lst = node->next;
|
||||
FREE(node);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user