mirror of https://github.com/mgba-emu/mgba.git
Abort in invalid memory instead of SEGVing
This commit is contained in:
parent
aa99196700
commit
728f6481d6
|
@ -7,6 +7,7 @@
|
|||
#include "memory.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static void GBASetActiveRegion(struct ARMMemory* memory, uint32_t region);
|
||||
|
@ -117,8 +118,10 @@ static void GBASetActiveRegion(struct ARMMemory* memory, uint32_t address) {
|
|||
memory->activeMask = SIZE_CART0 - 1;
|
||||
break;
|
||||
default:
|
||||
GBALog(gbaMemory->p, GBA_LOG_ERROR, "Jumped to invalid address");
|
||||
memory->activeRegion = 0;
|
||||
memory->activeMask = 0;
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue