From 63169d767977faf50f55117174d4f62944631b11 Mon Sep 17 00:00:00 2001 From: Ani Date: Tue, 14 Feb 2017 22:29:10 +0000 Subject: [PATCH] Nekotekina: Fix loading nonexistent libs Nekotekina's fix for preventing loading nonexistent libs --- rpcs3/Crypto/unself.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rpcs3/Crypto/unself.cpp b/rpcs3/Crypto/unself.cpp index a77419372c..9df111260b 100644 --- a/rpcs3/Crypto/unself.cpp +++ b/rpcs3/Crypto/unself.cpp @@ -1258,7 +1258,12 @@ static bool CheckDebugSelf(fs::file& s) } extern fs::file decrypt_self(fs::file elf_or_self) -{ +{ + if (!elf_or_self) + { + return fs::file{}; + } + elf_or_self.seek(0); // Check SELF header first. Check for a debug SELF.