fix list accounting on sort! bad - how did this hide for so long?

SVN revision: 37951
This commit is contained in:
Carsten Haitzler 2008-12-06 02:51:04 +00:00
parent f8868ffa96
commit 84f8c174bf
1 changed files with 3 additions and 1 deletions

View File

@ -1422,18 +1422,20 @@ eina_list_sorted_merge(Eina_List *left, Eina_List *right, Eina_Compare_Cb func)
{ {
current->next = left; current->next = left;
left->prev = current; left->prev = current;
current->accounting = ret->accounting;
} }
if (right) if (right)
{ {
current->next = right; current->next = right;
right->prev = current; right->prev = current;
current->accounting = ret->accounting;
} }
while (current->next) while (current->next)
{ {
current->accounting = ret->accounting;
current = current->next; current = current->next;
current->accounting = ret->accounting;
} }
ret->accounting->last = current; ret->accounting->last = current;