summaryrefslogtreecommitdiff
path: root/romdb.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2016-10-16 21:58:29 -0700
committerMichael Pavone <pavone@retrodev.com>2016-10-16 21:58:29 -0700
commitbca6137da5d9aa173ba2106290d8dfbf75e0921d (patch)
treeb19438b4e8353f1701a50845aab731909811b40a /romdb.c
parentcd98b3665144c7a5ac641afe0fa916830bd2f563 (diff)
Fix segfault in certain games that have SRAM and ROM bankswitched at the same address
Diffstat (limited to 'romdb.c')
-rw-r--r--romdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/romdb.c b/romdb.c
index 7fba5ef..5a5e59d 100644
--- a/romdb.c
+++ b/romdb.c
@@ -543,7 +543,7 @@ void add_memmap_header(rom_info *info, uint8_t *rom, uint32_t size, memmap_chunk
info->map[1].read_8 = (read_8_fun)read_sram_b;
info->map[1].write_16 = (write_16_fun)write_sram_area_w;//these will be called all writes to the area
info->map[1].write_8 = (write_8_fun)write_sram_area_b;
- info->map[1].buffer = cart + 0x200000;
+ info->map[1].buffer = cart + 0x200000 / sizeof(uint16_t);
memmap_chunk *last = info->map + info->map_chunks - 1;
memset(last, 0, sizeof(memmap_chunk));