From 63861bf812ef6364b90b0f84412b5ac76bbc78ef Mon Sep 17 00:00:00 2001 From: Exzap <13877693+Exzap@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:07:43 +0200 Subject: [PATCH] Fix SpotPass downloads on Linux/MacOS --- src/Cafe/IOSU/legacy/iosu_boss.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Cafe/IOSU/legacy/iosu_boss.cpp b/src/Cafe/IOSU/legacy/iosu_boss.cpp index 7b7ce250..c2c1eb51 100644 --- a/src/Cafe/IOSU/legacy/iosu_boss.cpp +++ b/src/Cafe/IOSU/legacy/iosu_boss.cpp @@ -119,7 +119,7 @@ namespace iosu uint32 turn_state = 0; uint32 wait_state = 0; - uint32 http_status_code = 0; + long http_status_code = 0; ContentType content_type = ContentType::kUnknownContent; std::vector result_buffer; @@ -592,6 +592,7 @@ namespace iosu int curl_result = curl_easy_perform(curl); curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &it->http_status_code); + static_assert(sizeof(it->http_status_code) == sizeof(long)); //it->turn_state = kFinished; @@ -909,10 +910,10 @@ namespace iosu return it != g_boss.tasks.cend() ? std::make_pair(it->exec_count, it->processed_length) : std::make_pair(0u, (uint64)0); } - std::pair task_get_http_status_code(const char* taskId, uint32 accountId, uint64 titleId) + std::pair task_get_http_status_code(const char* taskId, uint32 accountId, uint64 titleId) { const auto it = get_task(taskId, accountId, titleId); - return it != g_boss.tasks.cend() ? std::make_pair(it->exec_count, it->http_status_code) : std::make_pair(0u, (uint32)0); + return it != g_boss.tasks.cend() ? std::make_pair(it->exec_count, it->http_status_code) : std::make_pair(0u, (long)0); } std::pair task_get_turn_state(const char* taskId, uint32 accountId, uint64 titleId)