From 2577dfde7e5e26dd6a38b8093c774eea02c27eab Mon Sep 17 00:00:00 2001 From: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com> Date: Mon, 24 Nov 2025 02:30:09 +0100 Subject: [PATCH] Add assert on SFO file being empty (#3815) --- src/core/file_format/psf.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/file_format/psf.cpp b/src/core/file_format/psf.cpp index 047828330..e647059f0 100644 --- a/src/core/file_format/psf.cpp +++ b/src/core/file_format/psf.cpp @@ -36,6 +36,7 @@ bool PSF::Open(const std::filesystem::path& filepath) { } const u64 psfSize = file.GetSize(); + ASSERT_MSG(psfSize != 0, "SFO file at {} is empty!", filepath.string()); std::vector psf(psfSize); file.Seek(0); file.Read(psf);