From bed872ed38e19d34c6c2e3d1a3d35a9f72e46970 Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
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/loader.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/core/loader/loader.cpp')

diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp
index 91659ec176..9cd0b0ccd0 100644
--- a/src/core/loader/loader.cpp
+++ b/src/core/loader/loader.cpp
@@ -93,7 +93,7 @@ std::string GetFileTypeString(FileType type) {
     return "unknown";
 }
 
-constexpr std::array<const char*, 59> RESULT_MESSAGES{
+constexpr std::array<const char*, 60> RESULT_MESSAGES{
     "The operation completed successfully.",
     "The loader requested to load is already loaded.",
     "The operation is not implemented.",
@@ -128,6 +128,7 @@ constexpr std::array<const char*, 59> RESULT_MESSAGES{
     "The RomFS could not be found.",
     "The ELF file has incorrect size as determined by the header.",
     "There was a general error loading the NRO into emulated memory.",
+    "There was a general error loading the NSO into emulated memory.",
     "There is no icon available.",
     "There is no control data available.",
     "The NAX file has a bad header.",
-- 
cgit v1.2.3-70-g09d2