mirror of
https://github.com/redstrate/Astra.git
synced 2025-05-17 14:47:45 +00:00
Parse ticket time as qint64 instead of regular int
This wasn't the issue, but it's a good idea not to truncate this anyway.
This commit is contained in:
parent
05d33dc5d7
commit
e866164a4a
3 changed files with 3 additions and 3 deletions
|
@ -6,4 +6,4 @@
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
QString encryptGameArg(const QString &arg);
|
QString encryptGameArg(const QString &arg);
|
||||||
std::pair<QString, int> encryptSteamTicket(QString ticket, uint32_t time);
|
std::pair<QString, int> encryptSteamTicket(QString ticket, qint64 time);
|
||||||
|
|
|
@ -101,7 +101,7 @@ QStringList intoChunks(const QString &str, const int maxChunkSize)
|
||||||
return chunks;
|
return chunks;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<QString, int> encryptSteamTicket(QString ticket, uint32_t time)
|
std::pair<QString, int> encryptSteamTicket(QString ticket, qint64 time)
|
||||||
{
|
{
|
||||||
// Round the time down
|
// Round the time down
|
||||||
time -= 5;
|
time -= 5;
|
||||||
|
|
|
@ -47,5 +47,5 @@ QCoro::Task<std::pair<QString, int>> SteamAPI::getTicket()
|
||||||
|
|
||||||
const QJsonDocument document = QJsonDocument::fromJson(ticketBytes);
|
const QJsonDocument document = QJsonDocument::fromJson(ticketBytes);
|
||||||
|
|
||||||
co_return encryptSteamTicket(document[QStringLiteral("ticket")].toString(), document[QStringLiteral("ticket")].toInt());
|
co_return encryptSteamTicket(document[QStringLiteral("ticket")].toString(), document[QStringLiteral("ticket")].toInteger());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue