diff options
Diffstat (limited to 'lib/libalpm/alpm_list.c')
-rw-r--r-- | lib/libalpm/alpm_list.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c index 83ba9dca..69ea469a 100644 --- a/lib/libalpm/alpm_list.c +++ b/lib/libalpm/alpm_list.c @@ -286,8 +286,11 @@ alpm_list_t SYMEXPORT *alpm_list_msort(alpm_list_t *list, size_t n, lastleft = lastleft->next; } right = lastleft->next; - /* terminate first list */ + + /* tidy new lists */ lastleft->next = NULL; + right->prev = left->prev; + left->prev = lastleft; left = alpm_list_msort(left, half, fn); right = alpm_list_msort(right, n - half, fn); |