System: Add a workaround for PSF files with incorrect header

This commit is contained in:
Connor McLaughlin
2021-11-06 10:48:23 +10:00
parent 0adbfcbb1f
commit 946481c2aa
2 changed files with 17 additions and 11 deletions

View File

@ -247,7 +247,10 @@ bool IsValidPSExeHeader(const PSEXEHeader& header, u32 file_size)
return false;
if ((header.file_size + sizeof(PSEXEHeader)) > file_size)
return false;
{
Log_WarningPrintf("Incorrect file size in PS-EXE header: %u bytes should not be greater than %u bytes",
header.file_size, file_size - sizeof(PSEXEHeader));
}
return true;
}