From 98223b0e7ddcba50a591413894c20519bc9d653d Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 17 Jul 2018 17:28:41 -0300 Subject: [PATCH] Fix wrong assignment and allow null FilePaths on Executable --- Ryujinx.HLE/Loaders/Executable.cs | 6 +++++- Ryujinx.HLE/Loaders/Executables/Nso.cs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Ryujinx.HLE/Loaders/Executable.cs b/Ryujinx.HLE/Loaders/Executable.cs index 43193245..84f5ff39 100644 --- a/Ryujinx.HLE/Loaders/Executable.cs +++ b/Ryujinx.HLE/Loaders/Executable.cs @@ -31,7 +31,11 @@ namespace Ryujinx.HLE.Loaders FilePath = Exe.FilePath; - Name = Path.GetFileNameWithoutExtension(FilePath.Replace(Homebrew.TemporaryNroSuffix, "")); + if (FilePath != null) + { + Name = Path.GetFileNameWithoutExtension(FilePath.Replace(Homebrew.TemporaryNroSuffix, "")); + } + this.Memory = Memory; this.ImageBase = ImageBase; this.ImageEnd = ImageBase; diff --git a/Ryujinx.HLE/Loaders/Executables/Nso.cs b/Ryujinx.HLE/Loaders/Executables/Nso.cs index 6a55c755..fef9c4b8 100644 --- a/Ryujinx.HLE/Loaders/Executables/Nso.cs +++ b/Ryujinx.HLE/Loaders/Executables/Nso.cs @@ -29,7 +29,7 @@ namespace Ryujinx.HLE.Loaders.Executables HasDataHash = 1 << 5 } - public Nso(Stream Input, string Name) + public Nso(Stream Input, string FilePath) { this.FilePath = FilePath;