diff options
-rw-r--r-- | src/app/qbs-setup-toolchains/xcodeprobe.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/app/qbs-setup-toolchains/xcodeprobe.cpp b/src/app/qbs-setup-toolchains/xcodeprobe.cpp index 362a45e77..38df7ff72 100644 --- a/src/app/qbs-setup-toolchains/xcodeprobe.cpp +++ b/src/app/qbs-setup-toolchains/xcodeprobe.cpp @@ -83,7 +83,7 @@ int XcodeProbe::compareVersions(const QString &v1, const QString &v2) QStringList v1L = v1.split(QLatin1Char('.')); QStringList v2L = v2.split(QLatin1Char('.')); int i = 0; - while (v1.length() > i && v1.length() > i) { + while (v1L.length() > i && v2L.length() > i) { bool n1Ok, n2Ok; int n1 = v1L.value(i).toInt(&n1Ok); int n2 = v2L.value(i).toInt(&n2Ok); @@ -97,9 +97,9 @@ int XcodeProbe::compareVersions(const QString &v1, const QString &v2) return 1; ++i; } - if (v1.length() > v2.length()) + if (v1L.length() > v2L.length()) return -1; - if (v1.length() < v2.length()) + if (v1L.length() < v2L.length()) return 1; return 0; } |