From: Timo Sirainen Date: Wed, 16 Jun 2004 00:46:51 +0000 (+0300) Subject: merging expunge buffers sometimes produced wrong results X-Git-Tag: 1.1.alpha1~3968 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2605ee4f5e4f6cb00e46295cb5cc1f1ef2d28d1;p=thirdparty%2Fdovecot%2Fcore.git merging expunge buffers sometimes produced wrong results --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-transaction-util.c b/src/lib-index/mail-transaction-util.c index fc10066814..276507c51f 100644 --- a/src/lib-index/mail-transaction-util.c +++ b/src/lib-index/mail-transaction-util.c @@ -207,7 +207,8 @@ mail_transaction_log_sort_expunges(buffer_t *expunges_buf, if (first > 0 && new_exp.uid1 <= dest[first-1].uid2+1) { /* continue previous record */ - dest[first-1].uid2 = new_exp.uid2; + if (dest[first-1].uid2 < new_exp.uid2) + dest[first-1].uid2 = new_exp.uid2; } else if (i == first) { buffer_insert(expunges_buf, i * sizeof(new_exp), &new_exp, sizeof(new_exp));