# HG changeset patch # User Michael Pavone # Date 1476680309 25200 # Node ID 9a74eb24e53c2fa1b750a4d0a37b5300220d4fa9 # Parent a68274a25e2fb2ede7488850a83574ae6155e4f3 Fix segfault in certain games that have SRAM and ROM bankswitched at the same address diff -r a68274a25e2f -r 9a74eb24e53c romdb.c --- a/romdb.c Sun Oct 16 18:25:18 2016 -0700 +++ b/romdb.c Sun Oct 16 21:58:29 2016 -0700 @@ -543,7 +543,7 @@ 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));