dovecot-2.0: mail_index_update_flags_range(): Fixed merging last...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Jan 31 20:29:41 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/2893ca172707
changeset: 10618:2893ca172707
user: Timo Sirainen <tss at iki.fi>
date: Sun Jan 31 20:29:25 2010 +0200
description:
mail_index_update_flags_range(): Fixed merging last update.
diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
src/lib-index/mail-index-transaction-update.c | 4 ++--
diffs (14 lines):
diff -r 8dcfb629a060 -r 2893ca172707 src/lib-index/mail-index-transaction-update.c
--- a/src/lib-index/mail-index-transaction-update.c Sun Jan 31 19:15:39 2010 +0200
+++ b/src/lib-index/mail-index-transaction-update.c Sun Jan 31 20:29:25 2010 +0200
@@ -522,8 +522,8 @@ mail_index_insert_flag_update(struct mai
/* merge everything */
idx = first_idx == 0 ? 0 : first_idx - 1;
- max = I_MIN(t->last_update_idx + 1, count);
- for (; idx+1 < max; ) {
+ max = count == 0 ? 0 : I_MIN(t->last_update_idx + 1, count-1);
+ for (; idx < max; ) {
if (updates[idx].uid2 + 1 == updates[idx+1].uid1 &&
updates[idx].add_flags == updates[idx+1].add_flags &&
updates[idx].remove_flags == updates[idx+1].remove_flags) {
More information about the dovecot-cvs
mailing list