Let imap_complete_hosts work with the last mailbox (closes #2949).
authorAndreas Jaggi <Andreas Jaggi>
Sun, 9 Sep 2007 22:48:23 +0000 (15:48 -0700)
committerAndreas Jaggi <Andreas Jaggi>
Sun, 9 Sep 2007 22:48:23 +0000 (15:48 -0700)
This was an off-by-one error in the mailbox loop.

imap/imap.c

index 2eb8181d74c04a25fc8e22188291a06fdbc87980..bc1ca394b36aef9f37bf7a8dd1e8d81a588bef1d 100644 (file)
@@ -1866,7 +1866,7 @@ imap_complete_hosts (char *dest, size_t len)
   int matchlen;
   
   matchlen = mutt_strlen (dest);
-  for (mailbox = Incoming; mailbox && mailbox->next; mailbox = mailbox->next)
+  for (mailbox = Incoming; mailbox; mailbox = mailbox->next)
   {
     if (!mutt_strncmp (dest, mailbox->path, matchlen))
     {