summaryrefslogtreecommitdiff
path: root/m68k_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'm68k_core.c')
-rw-r--r--m68k_core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/m68k_core.c b/m68k_core.c
index 31f536b..1ac4ca2 100644
--- a/m68k_core.c
+++ b/m68k_core.c
@@ -643,7 +643,10 @@ void map_native_address(m68k_context * context, uint32_t address, code_ptr nativ
native_code_map[chunk].offsets = malloc(sizeof(int32_t) * NATIVE_CHUNK_SIZE);
memset(native_code_map[chunk].offsets, 0xFF, sizeof(int32_t) * NATIVE_CHUNK_SIZE);
}
- native_code_map[chunk].offsets[offset] = EXTENSION_WORD;
+ if (native_code_map[chunk].offsets[offset] == INVALID_OFFSET) {
+ //TODO: Better handling of overlapping instructions
+ native_code_map[chunk].offsets[offset] = EXTENSION_WORD;
+ }
}
}