mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 09:48:37 +12:00
Loader: handle fs::file is Null fatal after decrypt self
This commit is contained in:
parent
3ed98be6cd
commit
ab84a67511
1 changed files with 8 additions and 9 deletions
|
@ -1099,11 +1099,9 @@ void Emulator::Load(bool add_only)
|
||||||
{
|
{
|
||||||
elf_file.open(decrypted_path);
|
elf_file.open(decrypted_path);
|
||||||
}
|
}
|
||||||
else
|
// Decrypt SELF
|
||||||
|
else if (elf_file = decrypt_self(std::move(elf_file), klic.empty() ? nullptr : klic.data()))
|
||||||
{
|
{
|
||||||
// Decrypt SELF
|
|
||||||
elf_file = decrypt_self(std::move(elf_file), klic.empty() ? nullptr : klic.data());
|
|
||||||
|
|
||||||
if (fs::file elf_out{decrypted_path, fs::rewrite})
|
if (fs::file elf_out{decrypted_path, fs::rewrite})
|
||||||
{
|
{
|
||||||
elf_out.write(elf_file.to_vector<u8>());
|
elf_out.write(elf_file.to_vector<u8>());
|
||||||
|
@ -1117,16 +1115,17 @@ void Emulator::Load(bool add_only)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ppu_exec_object ppu_exec;
|
|
||||||
ppu_prx_object ppu_prx;
|
|
||||||
spu_exec_object spu_exec;
|
|
||||||
|
|
||||||
if (!elf_file)
|
if (!elf_file)
|
||||||
{
|
{
|
||||||
LOG_ERROR(LOADER, "Failed to decrypt SELF: %s", elf_path);
|
LOG_ERROR(LOADER, "Failed to decrypt SELF: %s", elf_path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (ppu_exec.open(elf_file) == elf_error::ok)
|
|
||||||
|
ppu_exec_object ppu_exec;
|
||||||
|
ppu_prx_object ppu_prx;
|
||||||
|
spu_exec_object spu_exec;
|
||||||
|
|
||||||
|
if (ppu_exec.open(elf_file) == elf_error::ok)
|
||||||
{
|
{
|
||||||
// PS3 executable
|
// PS3 executable
|
||||||
m_state = system_state::ready;
|
m_state = system_state::ready;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue