diff --git a/launcher/src/profile.cpp b/launcher/src/profile.cpp index fa863c5..800f218 100644 --- a/launcher/src/profile.cpp +++ b/launcher/src/profile.cpp @@ -536,7 +536,7 @@ int Profile::numInstalledExpansions() const QString Profile::expansionVersion(const int index) const { - Q_ASSERT(index < numInstalledExpansions()); + Q_ASSERT(index <= numInstalledExpansions()); return m_repositories.repositories[index + 1].version; } diff --git a/launcher/src/squarelauncher.cpp b/launcher/src/squarelauncher.cpp index e0472bb..85551a1 100644 --- a/launcher/src/squarelauncher.cpp +++ b/launcher/src/squarelauncher.cpp @@ -169,11 +169,11 @@ QCoro::Task<> SquareLauncher::registerSession(const LoginInformation &info) request.setHeader(QNetworkRequest::ContentTypeHeader, QByteArrayLiteral("application/x-www-form-urlencoded")); QString report = QStringLiteral("%1=%2").arg(info.profile->bootVersion(), getBootHash(info)); - for (int i = 1; i < auth.maxExpansion + 1; i++) { + for (int i = 0; i < auth.maxExpansion; i++) { if (i < static_cast(info.profile->numInstalledExpansions())) { - report += QStringLiteral("\nex%1\t%2").arg(QString::number(i), info.profile->expansionVersion(i)); + report += QStringLiteral("\nex%1\t%2").arg(QString::number(i + 1), info.profile->expansionVersion(i)); } else { - report += QStringLiteral("\nex%1\t2012.01.01.0000.0000").arg(QString::number(i)); + report += QStringLiteral("\nex%1\t2012.01.01.0000.0000").arg(QString::number(i + 1)); } }