summaryrefslogtreecommitdiffstats
path: root/qmake/library/qmakeglobals.cpp
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-07-12 14:03:21 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-12 14:03:21 +0200
commit1866c13b7dd48aa0c6ede1cf7907a2640e9399f8 (patch)
tree0b61c2d801525228f4c5795795d1cdeb57b3edfa /qmake/library/qmakeglobals.cpp
parent5b648d4d79d07a7c851ce6211ffff8375d41bfa2 (diff)
parent3ef6cf060e984bca43956a23b61b32ec7347cfc7 (diff)
Merge "Merge branch 'stable' into dev" into refs/staging/dev
Diffstat (limited to 'qmake/library/qmakeglobals.cpp')
-rw-r--r--qmake/library/qmakeglobals.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qmake/library/qmakeglobals.cpp b/qmake/library/qmakeglobals.cpp
index e47a4efe0b..bf37d51c40 100644
--- a/qmake/library/qmakeglobals.cpp
+++ b/qmake/library/qmakeglobals.cpp
@@ -249,7 +249,8 @@ void QMakeGlobals::setDirectories(const QString &input_dir, const QString &outpu
int srcLen = srcpath.length();
int dstLen = dstpath.length();
int lastSl = -1;
- while (++lastSl, srcpath.at(--srcLen) == dstpath.at(--dstLen))
+ while (++lastSl, --srcLen, --dstLen,
+ srcLen && dstLen && srcpath.at(srcLen) == dstpath.at(dstLen))
if (srcpath.at(srcLen) == QLatin1Char('/'))
lastSl = 0;
source_root = srcpath.left(srcLen + lastSl);