Avoid crashing on PSX EBOOTs renamed to ISO (people try strange things...)

This commit is contained in:
Henrik Rydgård committed 2024-10-25 15:20:08 +02:00
1 parent 7d24fca4e2
commit bd8905aa44
3 files changed
+13 -1

No files matched your search

+11
View File
@@ -395,6 +395,17 @@ NPDRMDemoBlockDevice::NPDRMDemoBlockDevice(FileLoader *fileLoader)
ERROR_LOG(Log::Loader, "Invalid NPUMDIMG header!");
}
u32 psar_id;
fileLoader->ReadAt(psarOffset, 4, 1, &psar_id);
INFO_LOG(Log::Loader, "NPDRM: PSAR ID: %08x");
// PS1 PSAR begins with "PSISOIMG0000"
if (psar_id == 'SISP') {
lbaSize_ = 0; // Mark invalid
ERROR_LOG(Log::Loader, "PSX not supported! Should have been caught earlier.");
return;
}
kirk_init();
// getkey