From e866164a4a4401f058d0557894c186dc0deb8ff8 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 4 May 2025 16:36:27 -0400 Subject: [PATCH] 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. --- launcher/include/encryptedarg.h | 2 +- launcher/src/encryptedarg.cpp | 2 +- launcher/src/steamapi.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/launcher/include/encryptedarg.h b/launcher/include/encryptedarg.h index bf41124..49963fb 100644 --- a/launcher/include/encryptedarg.h +++ b/launcher/include/encryptedarg.h @@ -6,4 +6,4 @@ #include QString encryptGameArg(const QString &arg); -std::pair encryptSteamTicket(QString ticket, uint32_t time); +std::pair encryptSteamTicket(QString ticket, qint64 time); diff --git a/launcher/src/encryptedarg.cpp b/launcher/src/encryptedarg.cpp index f3411b8..0e3a43d 100644 --- a/launcher/src/encryptedarg.cpp +++ b/launcher/src/encryptedarg.cpp @@ -101,7 +101,7 @@ QStringList intoChunks(const QString &str, const int maxChunkSize) return chunks; } -std::pair encryptSteamTicket(QString ticket, uint32_t time) +std::pair encryptSteamTicket(QString ticket, qint64 time) { // Round the time down time -= 5; diff --git a/launcher/src/steamapi.cpp b/launcher/src/steamapi.cpp index 3fae9e8..80278b5 100644 --- a/launcher/src/steamapi.cpp +++ b/launcher/src/steamapi.cpp @@ -47,5 +47,5 @@ QCoro::Task> 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()); }