Nekotekina: Fix loading nonexistent libs

Nekotekina's fix for preventing loading nonexistent libs
This commit is contained in:
Ani 2017-02-14 22:29:10 +00:00 committed by Ivan
parent 5d705c0e9c
commit 63169d7679
1 changed files with 6 additions and 1 deletions

View File

@ -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.