git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit ec7d756e3b8192b0ddf648cd34cab7c5933e4ea7
parent 0fbd714d4a21c2d8afc94ee4ef513829de7da254
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Sun, 28 Feb 2021 15:27:50 +0200

Merge pull request #351 from NieDzejkob/symbol-off-by-one

Fix off-by-one in symbol search
Diffstat:
MCore/symbol_hash.c2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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) {

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.