# HG changeset patch # User Michael Pavone # Date 1704167420 28800 # Node ID 49b7ead35482df8f8bb45fa2a6825b6bac0089d7 # Parent 34b4ff0918915eef58a23847f1c0fc86a6610ce0 Fix asan violation that occurs when locking on a cart with its own mapper hardware diff -r 34b4ff091891 -r 49b7ead35482 romdb.c --- a/romdb.c Mon Jan 01 19:27:31 2024 -0800 +++ b/romdb.c Mon Jan 01 19:50:20 2024 -0800 @@ -469,6 +469,7 @@ { rom_info info; info.mapper_type = MAPPER_NONE; + info.mapper_start_index = 0; info.name = get_header_name(rom); info.regions = get_header_regions(rom); info.is_save_lock_on = 0; @@ -834,6 +835,8 @@ //skip this entry if there is no lock on cartridge attached return; } + //TODO: detect if this conflicts with host cart mapper + state->info->mapper_start_index = lock_info.mapper_start_index; uint32_t matching_chunks = 0; for (int i = 0; i < lock_info.map_chunks; i++) {