diff options
author | Markus Wick <markus@selfnet.de> | 2020-01-12 16:51:07 +0100 |
---|---|---|
committer | Markus Wick <markus@selfnet.de> | 2020-01-18 08:29:19 +0100 |
commit | 7e94e544f40ee8fc58fdea7c71fe48d8edd6fcb6 (patch) | |
tree | d98500be6d85b3b32653180ba9021464403e400f /src/core/loader/kip.cpp | |
parent | Merge pull request #3305 from ReinUsesLisp/point-size-program (diff) | |
download | yuzu-7e94e544f40ee8fc58fdea7c71fe48d8edd6fcb6.tar yuzu-7e94e544f40ee8fc58fdea7c71fe48d8edd6fcb6.tar.gz yuzu-7e94e544f40ee8fc58fdea7c71fe48d8edd6fcb6.tar.bz2 yuzu-7e94e544f40ee8fc58fdea7c71fe48d8edd6fcb6.tar.lz yuzu-7e94e544f40ee8fc58fdea7c71fe48d8edd6fcb6.tar.xz yuzu-7e94e544f40ee8fc58fdea7c71fe48d8edd6fcb6.tar.zst yuzu-7e94e544f40ee8fc58fdea7c71fe48d8edd6fcb6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/loader/kip.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/loader/kip.cpp b/src/core/loader/kip.cpp index 474b55cb1..092103abe 100644 --- a/src/core/loader/kip.cpp +++ b/src/core/loader/kip.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <cstring> #include "core/file_sys/kernel_executable.h" #include "core/file_sys/program_metadata.h" #include "core/gdbstub/gdbstub.h" @@ -76,8 +77,8 @@ AppLoader::LoadResult AppLoader_KIP::Load(Kernel::Process& process) { segment.addr = offset; segment.offset = offset; segment.size = PageAlignSize(static_cast<u32>(data.size())); - program_image.resize(offset); - program_image.insert(program_image.end(), data.begin(), data.end()); + program_image.resize(offset + data.size()); + std::memcpy(program_image.data() + offset, data.data(), data.size()); }; load_segment(codeset.CodeSegment(), kip->GetTextSection(), kip->GetTextOffset()); |