diff --git a/mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp b/mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp index 53b63465794..e8f8ef3d356 100644 --- a/mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp +++ b/mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp @@ -1275,8 +1275,10 @@ void nsImapServerResponseParser::envelope_data() fServerConnection.HandleMessageDownLoadLine(headerLine.GetBuffer(), PR_FALSE); } else - break; - fNextToken = GetNextToken(); + break; + // only fetch the next token if we aren't eating a parenthes + if (ContinueParse() && (*fNextToken != ')') || tableIndex < (int)(sizeof(EnvelopeTable) / sizeof(EnvelopeTable[0])) - 1 ) + fNextToken = GetNextToken(); } fNextToken = GetNextToken();