mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-20 19:57:45 +00:00
Fix expansion version string not being calculated correctly
Prevents login, oops
This commit is contained in:
parent
34886cf991
commit
05bf6fff4f
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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<int>(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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue