fix for halved output data - set list head's prev to new tail
This commit is contained in:
parent
685d4db676
commit
26f425b811
1 changed files with 2 additions and 0 deletions
|
@ -38,6 +38,8 @@ void doubly_linked_list_insert(DoublyLinkedList *l, void *value) {
|
|||
tail->next = node_new(value, l->element_size);
|
||||
tail->next->next = l->head;
|
||||
tail->next->prev = tail;
|
||||
|
||||
l->head->prev = tail->next;
|
||||
l->length += 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue