1
Fork 0
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:
Joshua Goins 2025-05-04 16:36:27 -04:00
parent 05d33dc5d7
commit e866164a4a
3 changed files with 3 additions and 3 deletions

View file

@ -6,4 +6,4 @@
#include <QString>
QString encryptGameArg(const QString &arg);
std::pair<QString, int> encryptSteamTicket(QString ticket, uint32_t time);
std::pair<QString, int> encryptSteamTicket(QString ticket, qint64 time);

View file

@ -101,7 +101,7 @@ QStringList intoChunks(const QString &str, const int maxChunkSize)
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
time -= 5;

View file

@ -47,5 +47,5 @@ QCoro::Task<std::pair<QString, int>> SteamAPI::getTicket()
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());
}