diff --git a/kmreaderwin.cpp b/kmreaderwin.cpp
index 8dc282bec..2b4fb68c6 100644
--- a/kmreaderwin.cpp
+++ b/kmreaderwin.cpp
@@ -637,10 +637,10 @@ void KMReaderWin::parseMsg(KMMessage* aMsg)
if ((type == "") || (stricmp(type, "text")==0))
{
str = msgPart.bodyDecoded();
+ str.resize( str.count() + 1 );
+ str.at( str.count() - 1 ) = '\0';
QCString cstr;
- cstr.duplicate( str.data(), str.count() );
- cstr += '\0';
-
+ cstr.assign(str);
if (i>0)
mViewer->write("