GBA: Improve multiboot detection

This commit is contained in:
Jeffrey Pfau 2015-11-10 22:41:51 -08:00
parent fe8c632c78
commit 49b16f3d9b
1 changed files with 3 additions and 0 deletions

View File

@ -727,6 +727,9 @@ bool GBAIsMB(struct VFile* vf) {
if (!GBAIsROM(vf)) {
return false;
}
if (vf->size(vf) > SIZE_WORKING_RAM) {
return false;
}
if (vf->seek(vf, GBA_MB_MAGIC_OFFSET, SEEK_SET) < 0) {
return false;
}