From cb1033581e2ef92defd57b91bfe290dee11ad588 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 28 Oct 2025 01:58:24 +0100 Subject: [PATCH] mem.c: Make sure the topmost for loop on mappings recalculate exits right after the first iteration if the mapping's end is zero (ie. if no address bits are ignored). --- src/mem/mem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mem/mem.c b/src/mem/mem.c index b4225372d..24500ef23 100644 --- a/src/mem/mem.c +++ b/src/mem/mem.c @@ -2347,6 +2347,9 @@ mem_mapping_recalc(uint64_t base, uint64_t size) _mem_state[c >> MEM_GRANULARITY_BITS].states[n].r)) read_mapping_bus[c >> MEM_GRANULARITY_BITS] = map; } + + if (i_e == 0x00000000ULL) + break; } } map = map->next;