diff options
| author | David Bremner <david@tethera.net> | 2023-11-28 09:21:11 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2023-11-28 09:21:11 -0400 |
| commit | 22eebce431269398e1cb4d753bc737e30a35eb26 (patch) | |
| tree | 794cb7c4a38a990117d019d37ca8ba6828290554 | |
| parent | bddeb20110d5149eb11a88a115716189a658a02a (diff) | |
| parent | 4f82acce17ca51b03bea2abe3eefb7c3026138fe (diff) | |
Merge branch 'release'
| -rw-r--r-- | lib/string-map.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 |
