From 7a73dc3d0a6a0c06afc4c39ce824b28d1cf525af Mon Sep 17 00:00:00 2001 From: Bobbi Webber-Manners Date: Sun, 16 May 2021 21:29:18 -0400 Subject: [PATCH] EMAIL: Fixed bug switching to non-existant mbox --- apps/email.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/email.c b/apps/email.c index 008d1f3..51ba893 100644 --- a/apps/email.c +++ b/apps/email.c @@ -1033,7 +1033,7 @@ uint8_t is_mime_boundary(char *p) { if (*p == ' ') // Can not contain ' ' return 0; ++p; - } while(*p && (*p != '\r')); + } while (*p && (*p != '\r')); return 1; } @@ -1396,7 +1396,7 @@ void switch_mailbox(char *mbox) { // Treat '.' as shortcut for INBOX if (!strcmp(mbox, ".")) strcpy(mbox, inbox); - while(mbox[i]) { + while (mbox[i]) { mbox[i] = toupper(mbox[i]); ++i; } @@ -1406,7 +1406,7 @@ void switch_mailbox(char *mbox) { i = read_email_db(first_msg, 1, 1); // Errors non-fatal if (i) { strcpy(curr_mbox, prev_mbox); - return; + i = read_email_db(first_msg, 1, 0); // Errors fatal } selection = 1; email_summary();