Commit 612f9a55 612f9a557fc97f23711e3c6c55f3e601ac4ac32d by Sergey Poznyakoff

Ensure stability of merge sort in assoc

* libmailutils/base/assoc.c (merge): Fix comparison
1 parent 7c939cbc
...@@ -695,7 +695,7 @@ merge (struct _mu_assoc_elem *left, struct _mu_assoc_elem *right, ...@@ -695,7 +695,7 @@ merge (struct _mu_assoc_elem *left, struct _mu_assoc_elem *right,
695 695
696 while (left && right) 696 while (left && right)
697 { 697 {
698 if (cmp (left->name, left->data, right->name, right->data, data) < 0) 698 if (cmp (left->name, left->data, right->name, right->data, data) <= 0)
699 { 699 {
700 tmp = left->next; 700 tmp = left->next;
701 *tailptr = left; 701 *tailptr = left;
......