Преглед изворни кода

Fix wrong assignment and allow null FilePaths on Executable

gdkchan пре 7 година
родитељ
комит
98223b0e7d
2 измењених фајлова са 6 додато и 2 уклоњено
  1. 5 1
      Ryujinx.HLE/Loaders/Executable.cs
  2. 1 1
      Ryujinx.HLE/Loaders/Executables/Nso.cs

+ 5 - 1
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;

+ 1 - 1
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;