[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kde4/kdelibs/kdecore
From: Hamish Rodda <rodda () kde ! org>
Date: 2005-06-12 14:54:13
Message-ID: 1118588053.148479.17903.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 424619 by rodda:
Ah, i see... the +1 got lost in the initial port.
Tests now pass
M +4 -1 kmacroexpander.cpp
--- branches/work/kde4/kdelibs/kdecore/kmacroexpander.cpp #424618:424619
@@ -361,7 +361,7 @@
return 2;
}
const KMacroMapExpander<QChar,VT> *const_this = this;
- typename QMap<QChar,VT>::const_iterator it = const_this->macromap.find(str[pos]);
+ typename QMap<QChar,VT>::const_iterator it = const_this->macromap.find(str[pos+1]);
if (it != const_this->macromap.end()) {
ret += it.value();
return 2;
@@ -409,6 +409,9 @@
int
KMacroMapExpander<QString,VT>::expandEscapedMacro( const QString &str, int pos, QStringList &ret )
{
+ if (str.length() <= pos + 1)
+ return 0;
+
if (str[pos + 1] == escapeChar()) {
ret += QString( escapeChar() );
return 2;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic