diff --git a/Core/symbol_hash.c b/Core/symbol_hash.c index 75a7837..a3718b8 100644 --- a/Core/symbol_hash.c +++ b/Core/symbol_hash.c @@ -40,7 +40,7 @@ const GB_bank_symbol_t *GB_map_find_symbol(GB_symbol_map_t *map, uint16_t addr) { if (!map) return NULL; size_t index = GB_map_find_symbol_index(map, addr); - if (index < map->n_symbols && map->symbols[index].addr != addr) { + if (index >= map->n_symbols || map->symbols[index].addr != addr) { index--; } if (index < map->n_symbols) {