From f6ec01fd49de444c4a0df3623142e42295ab0aea Mon Sep 17 00:00:00 2001 From: a Date: Fri, 6 Dec 2024 23:13:38 +0200 Subject: [PATCH] set missing result data in `Steam_UGC::SetUserItemVote()` --- dll/steam_ugc.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dll/steam_ugc.cpp b/dll/steam_ugc.cpp index 66ce3274..ea0bf7d1 100644 --- a/dll/steam_ugc.cpp +++ b/dll/steam_ugc.cpp @@ -1188,9 +1188,6 @@ SteamAPICall_t Steam_UGC::SetUserItemVote( PublishedFileId_t nPublishedFileID, b if (!settings->isModInstalled(nPublishedFileID)) return k_uAPICallInvalid; // TODO is this correct auto mod = settings->getMod(nPublishedFileID); - SetUserItemVoteResult_t data{}; - data.m_eResult = EResult::k_EResultOK; - data.m_nPublishedFileId = nPublishedFileID; if (bVoteUp) { ++mod.votesUp; } else { @@ -1198,6 +1195,11 @@ SteamAPICall_t Steam_UGC::SetUserItemVote( PublishedFileId_t nPublishedFileID, b } settings->addModDetails(nPublishedFileID, mod); + SetUserItemVoteResult_t data{}; + data.m_eResult = EResult::k_EResultOK; + data.m_nPublishedFileId = nPublishedFileID; + data.m_bVoteUp = bVoteUp; + auto ret = callback_results->addCallResult(data.k_iCallback, &data, sizeof(data)); callbacks->addCBResult(data.k_iCallback, &data, sizeof(data)); return ret;