diff options
Diffstat (limited to 'imap/imap.c')
-rw-r--r-- | imap/imap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/imap/imap.c b/imap/imap.c index 349590cc..a419abb6 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -1135,7 +1135,11 @@ static int compare_uid (const void *a, const void *b) HEADER **pa = (HEADER **) a; HEADER **pb = (HEADER **) b; - return HEADER_DATA(*pa)->uid - HEADER_DATA(*pb)->uid; + if (HEADER_DATA(*pa)->uid < HEADER_DATA(*pb)->uid) + return -1; + if (HEADER_DATA(*pa)->uid > HEADER_DATA(*pb)->uid) + return 1; + return 0; } /* Note: headers must be in SORT_UID. See imap_exec_msgset for args. |