summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kioslaves/imap4/imapparser.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/kioslaves/imap4/imapparser.h b/kioslaves/imap4/imapparser.h
index 61e8a4393..d24e9c813 100644
--- a/kioslaves/imap4/imapparser.h
+++ b/kioslaves/imap4/imapparser.h
@@ -94,7 +94,11 @@ public:
}
uint length()
{
- return data.size() - pos;
+ if( pos < data.size() ) {
+ return data.size() - pos;
+ } else {
+ return 0;
+ }
}
void fromString(const TQString &s)
{