summaryrefslogtreecommitdiffstats
path: root/src/core/loader
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-09-30 20:28:17 +0200
committerZach Hilman <zachhilman@gmail.com>2018-10-07 20:32:32 +0200
commit081f5c1dbf8f7a40c801832f56adb5293e2bac1a (patch)
tree08f5e56dc68f2e4cc91b1ceb25237ecaa56de6ad /src/core/loader
parentqt: Add UI option to configure arguments (diff)
downloadyuzu-081f5c1dbf8f7a40c801832f56adb5293e2bac1a.tar
yuzu-081f5c1dbf8f7a40c801832f56adb5293e2bac1a.tar.gz
yuzu-081f5c1dbf8f7a40c801832f56adb5293e2bac1a.tar.bz2
yuzu-081f5c1dbf8f7a40c801832f56adb5293e2bac1a.tar.lz
yuzu-081f5c1dbf8f7a40c801832f56adb5293e2bac1a.tar.xz
yuzu-081f5c1dbf8f7a40c801832f56adb5293e2bac1a.tar.zst
yuzu-081f5c1dbf8f7a40c801832f56adb5293e2bac1a.zip
Diffstat (limited to 'src/core/loader')
-rw-r--r--src/core/loader/nro.cpp2
-rw-r--r--src/core/loader/nso.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp
index 4109b9974..0d7c1dcfa 100644
--- a/src/core/loader/nro.cpp
+++ b/src/core/loader/nro.cpp
@@ -155,7 +155,7 @@ bool AppLoader_NRO::LoadNro(FileSys::VirtualFile file, VAddr load_base) {
if (!Settings::values.program_args.empty()) {
const auto arg_data = Settings::values.program_args;
codeset->DataSegment().size += 0x9000;
- NSOArgumentHeader args_header{0x9000, arg_data.size(), {}};
+ NSOArgumentHeader args_header{0x9000, static_cast<u32_le>(arg_data.size()), {}};
program_image.resize(static_cast<u32>(program_image.size()) + 0x9000);
std::memcpy(program_image.data() + program_image.size() - 0x9000, &args_header,
sizeof(NSOArgumentHeader));
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp
index 8ee2c6f2b..c225e2d24 100644
--- a/src/core/loader/nso.cpp
+++ b/src/core/loader/nso.cpp
@@ -130,7 +130,7 @@ VAddr AppLoader_NSO::LoadModule(FileSys::VirtualFile file, VAddr load_base,
if (should_pass_arguments && !Settings::values.program_args.empty()) {
const auto arg_data = Settings::values.program_args;
codeset->DataSegment().size += 0x9000;
- NSOArgumentHeader args_header{0x9000, arg_data.size(), {}};
+ NSOArgumentHeader args_header{0x9000, static_cast<u32_le>(arg_data.size()), {}};
program_image.resize(static_cast<u32>(program_image.size()) + 0x9000);
std::memcpy(program_image.data() + program_image.size() - 0x9000, &args_header,
sizeof(NSOArgumentHeader));