Add assert on SFO file being empty (#3815)

This commit is contained in:
kalaposfos13
2025-11-24 02:30:09 +01:00
committed by GitHub
parent 8123c44ad1
commit 2577dfde7e

View File

@@ -36,6 +36,7 @@ bool PSF::Open(const std::filesystem::path& filepath) {
} }
const u64 psfSize = file.GetSize(); const u64 psfSize = file.GetSize();
ASSERT_MSG(psfSize != 0, "SFO file at {} is empty!", filepath.string());
std::vector<u8> psf(psfSize); std::vector<u8> psf(psfSize);
file.Seek(0); file.Seek(0);
file.Read(psf); file.Read(psf);