From kde-commits Sat Sep 30 22:12:23 2006 From: Adriaan de Groot Date: Sat, 30 Sep 2006 22:12:23 +0000 To: kde-commits Subject: KDE/kdelibs/kdeprint/lpr Message-Id: <1159654343.332263.11319.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=115965435728117 SVN commit 590806 by adridg: Less futzing about with lengths; avoids hypothetical length==0 crash. Patch by Robert Scott. M +5 -2 printcapreader.cpp --- trunk/KDE/kdelibs/kdeprint/lpr/printcapreader.cpp #590805:590806 @@ -44,8 +44,11 @@ else line = m_stream.readLine().trimmed(); // strip any '\' at the end - if (line[line.length()-1] == '\\') - line = line.left(line.length()-1).trimmed(); + if ( line.endsWith('\\') ) + { + line.chop(1); + line = line.trimmed(); + } return true; }