]> mj.ucw.cz Git - checkmail.git/commitdiff
Maildir: Skip Dovecot extended flags properly
authorMartin Mares <mj@ucw.cz>
Sun, 15 Feb 2015 00:58:37 +0000 (01:58 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 15 Feb 2015 00:58:37 +0000 (01:58 +0100)
cm.c

diff --git a/cm.c b/cm.c
index 3648eda983c6fe7cb4a5bbdeb4ca6fefac827ee1..9bc036672c4139ee175a48b34239bf0b0698bc52 100644 (file)
--- a/cm.c
+++ b/cm.c
@@ -680,7 +680,8 @@ scan_mdir(struct mbox *b)
          int flagged = 0;
          if (colon && colon[1] == '2' && colon[2] == ',')
            {
          int flagged = 0;
          if (colon && colon[1] == '2' && colon[2] == ',')
            {
-             for (int i=3; colon[i]; i++)
+             // Another comma can separate extended flags (Dovecot extension)
+             for (int i=3; colon[i] && colon[i] != ','; i++)
                switch (colon[i])
                  {
                  case 'S':
                switch (colon[i])
                  {
                  case 'S':