From 6e1a95011d9d4fb45946d1353e46ee18b1306545 Mon Sep 17 00:00:00 2001 From: beeanyew Date: Sat, 31 Jul 2021 23:10:38 +0200 Subject: [PATCH] Fix the stupid. Don't do things on four hours of sleep. --- m68kcpu.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/m68kcpu.h b/m68kcpu.h index 538a03c..0b18502 100644 --- a/m68kcpu.h +++ b/m68kcpu.h @@ -1364,6 +1364,7 @@ static inline void m68ki_write_8_fc(m68ki_cpu_core *state, uint address, uint fc if(cache->offset && address >= cache->lower && address < cache->upper) { cache->offset[address - cache->lower] = (unsigned char)value; + return; } for (int i = 0; i < state->write_ranges; i++) { @@ -1395,6 +1396,7 @@ static inline void m68ki_write_16_fc(m68ki_cpu_core *state, uint address, uint f if(cache->offset && address >= cache->lower && address < cache->upper) { ((short *)(cache->offset + (address - cache->lower)))[0] = htobe16(value); + return; } for (int i = 0; i < state->write_ranges; i++) { @@ -1426,6 +1428,7 @@ static inline void m68ki_write_32_fc(m68ki_cpu_core *state, uint address, uint f if(cache->offset && address >= cache->lower && address < cache->upper) { ((int *)(cache->offset + (address - cache->lower)))[0] = htobe32(value); + return; } for (int i = 0; i < state->write_ranges; i++) {