GBA: Fix expected entry point for multiboot ELFs (fixes #2450)

This commit is contained in:
Vicki Pfau 2022-02-18 22:15:31 -08:00
parent 66f445cd0a
commit a966511e1e
1 changed files with 2 additions and 2 deletions

View File

@ -582,7 +582,7 @@ bool GBAIsROM(struct VFile* vf) {
uint32_t entry = ELFEntry(elf);
bool isGBA = true;
isGBA = isGBA && ELFMachine(elf) == EM_ARM;
isGBA = isGBA && (entry == BASE_CART0 || entry == BASE_WORKING_RAM);
isGBA = isGBA && (entry == BASE_CART0 || entry == BASE_WORKING_RAM + 0xC0);
ELFClose(elf);
return isGBA;
}
@ -641,7 +641,7 @@ bool GBAIsMB(struct VFile* vf) {
#ifdef USE_ELF
struct ELF* elf = ELFOpen(vf);
if (elf) {
bool isMB = ELFEntry(elf) == BASE_WORKING_RAM;
bool isMB = ELFEntry(elf) == BASE_WORKING_RAM + 0xC0;
ELFClose(elf);
return isMB;
}