diff options
-rw-r--r-- | kioslaves/imap4/imapparser.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kioslaves/imap4/imapparser.cc b/kioslaves/imap4/imapparser.cc index f916d8294..9e8d68c90 100644 --- a/kioslaves/imap4/imapparser.cc +++ b/kioslaves/imap4/imapparser.cc @@ -1354,10 +1354,10 @@ void imapParser::parseBody (parseString & inWords) label = parseOneWordC (inWords); } - if (inWords[0] == ')') + if (!inWords.isEmpty () && inWords[0] == ')') inWords.pos++; } - if (inWords[0] == ']') + if (!inWords.isEmpty () && inWords[0] == ']') inWords.pos++; skipWS (inWords); @@ -1479,6 +1479,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords) { TQCString word = parseLiteralC(inWords, false, true); + if(!word.isEmpty()) { switch (word[0]) { case 'E': @@ -1602,6 +1603,9 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords) parseLiteralC(inWords); break; } + } else { + parseLiteralC(inWords); + } } } |