changeset 6532:da3093d9f572 HEAD

Assert-crashfix
author Timo Sirainen <tss@iki.fi>
date Sat, 06 Oct 2007 02:25:33 +0300
parents d747bfbda43c
children 6c96c8205fd0
files src/lib-storage/index/index-sort.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/index-sort.c	Sat Oct 06 02:16:56 2007 +0300
+++ b/src/lib-storage/index/index-sort.c	Sat Oct 06 02:25:33 2007 +0300
@@ -667,6 +667,7 @@
 	const struct mail_index_header *hdr;
 	const void *data;
 	struct mail_sort_node node;
+	uint32_t last_seq;
 
 	i_assert(mail->transaction == program->t);
 
@@ -708,7 +709,8 @@
 
 	/* add the nodes in the middle */
 	node.seq = program->last_sorted_seq + 1;
-	for (; node.seq <= program->prev_seq; node.seq++) {
+	last_seq = program->prev_seq;
+	for (; node.seq <= last_seq; node.seq++) {
 		mail_index_lookup_ext(t->trans_view, mail->seq, program->ext_id,
 				      &data, NULL);