update 'mp->lowmsg' from 0 to 1 during regular 'inc' from mail spool;
authorGlenn Burkhardt <glenn@aoi.ultranet.com>
Sun, 28 Sep 2003 14:27:34 +0000 (14:27 +0000)
committerGlenn Burkhardt <glenn@aoi.ultranet.com>
Sun, 28 Sep 2003 14:27:34 +0000 (14:27 +0000)
avoids failure of 'folder_realloc()' for case of no messages in
folder, and more than 100 messages to incorporate.  Initially,
'folder_read()' will initialize 'mp->lowmsg' to 0, and 'mp->lowoff'
to 1.  So the call would be folder_realloc(mp, 1, 200), and the
comparison 'if (mp->nummsg > 0 && lo > mp->lowmsg)' will fail.

uip/inc.c

index 1b49a84..09cfa95 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -845,6 +845,8 @@ go_to_it:
                msgnum++;
                mp->hghmsg++;
                mp->nummsg++;
                msgnum++;
                mp->hghmsg++;
                mp->nummsg++;
+               if (mp->lowmsg == 0) mp->lowmsg = 1;
+
                clear_msg_flags (mp, msgnum);
                set_exists (mp, msgnum);
                set_unseen (mp, msgnum);
                clear_msg_flags (mp, msgnum);
                set_exists (mp, msgnum);
                set_unseen (mp, msgnum);