GBA: Improve multiboot detection
Jeffrey Pfau jeffrey@endrift.com
Tue, 10 Nov 2015 22:41:51 -0800
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
src/gba/gba.c
→
src/gba/gba.c
@@ -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; }