Verify the header signature when loading a PBP.

Fixes headless tests crashing.
This commit is contained in:
Unknown W. Brackets 2013-04-27 17:54:38 -07:00
parent c7f5de9feb
commit 439fd54378

View file

@ -131,7 +131,7 @@ bool Load_PSP_ELF_PBP(const char *filename, std::string *error_string)
PBPReader reader(filename);
// Hacky check, should find something better
if (reader.GetSubFileSize(PBP_UNKNOWN_PSAR) > 0x100000) {
if (reader.IsValid() && reader.GetSubFileSize(PBP_UNKNOWN_PSAR) > 0x100000) {
// Yay, got a demo.
ISOFileSystem *umd0 = new ISOFileSystem(&pspFileSystem, new NPDRMDemoBlockDevice(filename));