--- kdebase-3.2.3/kioslave/thumbnail/textcreator.cpp-- 2004-08-26 09:48:51.680729735 +0200 +++ kdebase-3.2.3/kioslave/thumbnail/textcreator.cpp 2004-08-26 09:49:24.586518285 +0200 @@ -145,9 +145,10 @@ bool TextCreator::create(const QString & if ( !newLine ) { int pos = text.find( '\n', i ); - if ( pos > (int) i ) - i = pos +1; - } + if ( pos == -1 ) + break; + i = pos + 1; + } newLine = false; }