diff options
| author | 2018-10-14 21:41:58 -0400 | |
|---|---|---|
| committer | 2018-10-15 17:02:11 -0400 | |
| commit | bed872ed38e19d34c6c2e3d1a3d35a9f72e46970 (patch) | |
| tree | 6533551afe9c5432fa8789a1517a97111d0041c6 /src/core/loader/loader.cpp | |
| parent | nso: Make LoadModule take a VfsFile by const reference (diff) | |
| download | yuzu-bed872ed38e19d34c6c2e3d1a3d35a9f72e46970.tar.gz yuzu-bed872ed38e19d34c6c2e3d1a3d35a9f72e46970.tar.xz yuzu-bed872ed38e19d34c6c2e3d1a3d35a9f72e46970.zip | |
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.
Diffstat (limited to 'src/core/loader/loader.cpp')
| -rw-r--r-- | src/core/loader/loader.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 91659ec17..9cd0b0ccd 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp | |||
| @@ -93,7 +93,7 @@ std::string GetFileTypeString(FileType type) { | |||
| 93 | return "unknown"; | 93 | return "unknown"; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | constexpr std::array<const char*, 59> RESULT_MESSAGES{ | 96 | constexpr std::array<const char*, 60> RESULT_MESSAGES{ |
| 97 | "The operation completed successfully.", | 97 | "The operation completed successfully.", |
| 98 | "The loader requested to load is already loaded.", | 98 | "The loader requested to load is already loaded.", |
| 99 | "The operation is not implemented.", | 99 | "The operation is not implemented.", |
| @@ -128,6 +128,7 @@ constexpr std::array<const char*, 59> RESULT_MESSAGES{ | |||
| 128 | "The RomFS could not be found.", | 128 | "The RomFS could not be found.", |
| 129 | "The ELF file has incorrect size as determined by the header.", | 129 | "The ELF file has incorrect size as determined by the header.", |
| 130 | "There was a general error loading the NRO into emulated memory.", | 130 | "There was a general error loading the NRO into emulated memory.", |
| 131 | "There was a general error loading the NSO into emulated memory.", | ||
| 131 | "There is no icon available.", | 132 | "There is no icon available.", |
| 132 | "There is no control data available.", | 133 | "There is no control data available.", |
| 133 | "The NAX file has a bad header.", | 134 | "The NAX file has a bad header.", |