Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/alpm_list.c')
-rw-r--r--lib/libalpm/alpm_list.c5
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);