diff options
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/providers/imap4/camel-imap4-folder.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index fcd2738376..1a1a467966 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2004-06-17 Jeffrey Stedfast <fejj@ximian.com> + + * providers/imap4/camel-imap4-folder.c (uidset_init): init + tail->last to (guint32) -1, so that index = tail->last + 1 will + start at 0 :-) + 2004-06-17 Rodney Dawes <dobey@novell.com> * camel-mime-filter-tohtml.c: Add support for the webcal, callto, and diff --git a/camel/providers/imap4/camel-imap4-folder.c b/camel/providers/imap4/camel-imap4-folder.c index c5b94af89d..e06b5ab563 100644 --- a/camel/providers/imap4/camel-imap4-folder.c +++ b/camel/providers/imap4/camel-imap4-folder.c @@ -343,10 +343,10 @@ static void uidset_init (struct _uidset *uidset, CamelFolderSummary *summary, size_t maxlen) { uidset->ranges = g_new (struct _uidset_range, 1); + uidset->ranges->first = (guint32) -1; + uidset->ranges->last = (guint32) -1; uidset->ranges->next = NULL; uidset->ranges->buflen = 0; - uidset->ranges->first = 0; - uidset->ranges->last = 0; uidset->tail = uidset->ranges; uidset->summary = summary; @@ -365,6 +365,7 @@ uidset_add (struct _uidset *uidset, CamelMessageInfo *info) guint32 index; char *colon; + /* Note: depends on integer overflow for initial tail->last value */ for (index = tail->last + 1; index < messages->len; index++) { if (info == messages->pdata[index]) break; |