From bed872ed38e19d34c6c2e3d1a3d35a9f72e46970 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 14 Oct 2018 21:41:58 -0400 Subject: nso: Return an optional address from LoadModule If a malformed NSO is attempted to be loaded, we shouldn't continue onwards. We should be reporting an error and bailing out. --- src/core/loader/nso.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/loader/nso.h') diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h index d92897130..433306139 100644 --- a/src/core/loader/nso.h +++ b/src/core/loader/nso.h @@ -4,6 +4,7 @@ #pragma once +#include #include "common/common_types.h" #include "core/file_sys/patch_manager.h" #include "core/loader/linker.h" @@ -36,9 +37,9 @@ public: return IdentifyType(file); } - static VAddr LoadModule(const FileSys::VfsFile& file, VAddr load_base, - bool should_pass_arguments, - boost::optional pm = boost::none); + static std::optional LoadModule(const FileSys::VfsFile& file, VAddr load_base, + bool should_pass_arguments, + std::optional pm = {}); ResultStatus Load(Kernel::Process& process) override; }; -- cgit v1.2.3