summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeystryku <Leystryku@gmail.com>2024-02-18 06:17:35 +0100
committerLeystryku <Leystryku@gmail.com>2024-02-18 06:17:35 +0100
commitbc5ae04ea080dff5609fb9833799b1618d715555 (patch)
tree9e000eddece57ab4c561fa640c98d3963dc1fa5a /src
parentfile_sys: Fix nacp field cache_storage_max_index datatype (diff)
downloadyuzu-bc5ae04ea080dff5609fb9833799b1618d715555.tar
yuzu-bc5ae04ea080dff5609fb9833799b1618d715555.tar.gz
yuzu-bc5ae04ea080dff5609fb9833799b1618d715555.tar.bz2
yuzu-bc5ae04ea080dff5609fb9833799b1618d715555.tar.lz
yuzu-bc5ae04ea080dff5609fb9833799b1618d715555.tar.xz
yuzu-bc5ae04ea080dff5609fb9833799b1618d715555.tar.zst
yuzu-bc5ae04ea080dff5609fb9833799b1618d715555.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/service/application_functions.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/service/am/service/application_functions.cpp b/src/core/hle/service/am/service/application_functions.cpp
index fe37083f3..7507263b2 100644
--- a/src/core/hle/service/am/service/application_functions.cpp
+++ b/src/core/hle/service/am/service/application_functions.cpp
@@ -15,9 +15,9 @@
#include "core/hle/service/cmif_serialization.h"
#include "core/hle/service/filesystem/filesystem.h"
#include "core/hle/service/filesystem/save_data_controller.h"
+#include "core/hle/service/glue/glue_manager.h"
#include "core/hle/service/ns/ns.h"
#include "core/hle/service/sm/sm.h"
-#include "core/hle/service/glue/glue_manager.h"
namespace Service::AM {
@@ -275,13 +275,13 @@ Result IApplicationFunctions::GetCacheStorageMax(Out<u32> out_cache_storage_inde
std::vector<u8> nacp;
R_TRY(system.GetARPManager().GetControlProperty(&nacp, m_applet->program_id));
- FileSys::RawNACP raw_nacp{};
- std::memcpy(&raw_nacp, nacp.data(), std::min(sizeof(raw_nacp), nacp.size()));
+ std::unique_ptr<FileSys::RawNACP> raw_nacp(new FileSys::RawNACP{});
+ std::memcpy(raw_nacp.get(), nacp.data(), std::min(sizeof(*raw_nacp), nacp.size()));
- *out_cache_storage_index_max = static_cast<u32>(raw_nacp.cache_storage_max_index);
- *out_max_journal_size = static_cast<u64>(raw_nacp.cache_storage_data_and_journal_max_size);
+ *out_cache_storage_index_max = static_cast<u32>(raw_nacp->cache_storage_max_index);
+ *out_max_journal_size = static_cast<u64>(raw_nacp->cache_storage_data_and_journal_max_size);
- R_SUCCEED();
+ R_SUCCEED();
}
Result IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed(s64 unused) {