summaryrefslogtreecommitdiff
path: root/backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend.c')
-rw-r--r--backend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend.c b/backend.c
index acf66d5..400b6d8 100644
--- a/backend.c
+++ b/backend.c
@@ -99,7 +99,7 @@ uint16_t read_word(uint32_t address, void **mem_pointers, cpu_options *opts, voi
if (!chunk) {
return 0xFFFF;
}
- uint32_t offset = (address - chunk->start) & chunk->mask;
+ uint32_t offset = address & chunk->mask;
if (chunk->flags & MMAP_READ) {
uint8_t *base;
if (chunk->flags & MMAP_PTR_IDX) {