From: David Bremner Date: Tue, 28 Nov 2023 13:21:11 +0000 (-0400) Subject: Merge branch 'release' X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=22eebce431269398e1cb4d753bc737e30a35eb26;hp=bddeb20110d5149eb11a88a115716189a658a02a Merge branch 'release' --- diff --git a/lib/string-map.c b/lib/string-map.c index e3a81b4f..99bc2ea2 100644 --- a/lib/string-map.c +++ b/lib/string-map.c @@ -86,10 +86,14 @@ _notmuch_string_map_append (notmuch_string_map_t *map, static int cmppair (const void *pa, const void *pb) { + int cmp = 0; notmuch_string_pair_t *a = (notmuch_string_pair_t *) pa; notmuch_string_pair_t *b = (notmuch_string_pair_t *) pb; - return strcmp (a->key, b->key); + cmp = strcmp (a->key, b->key); + if (cmp == 0) + cmp = strcmp (a->value, b->value); + return cmp; } static void